Also, replace the generic `.alignright` class with a more specific class to avoid styling issues with themes which have padding/margin attached to `.alignright`.
Props azaozz, imath.
Fixes#36461.
git-svn-id: https://develop.svn.wordpress.org/trunk@37174 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@37171 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@37166 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@37165 602fd350-edb4-49c9-b593-d223f7449a82
We goofed, and parameters accessed through the REST API's methods
were slashed (inconsistently, even). This unslashes the data, so
you get the un-messed-with data that was sent.
Props joehoyle.
Fixes#36419.
git-svn-id: https://develop.svn.wordpress.org/trunk@37163 602fd350-edb4-49c9-b593-d223f7449a82
Replace the use of a `.screen-reader-text` element with an `aria-label` attribute to make the text easier to translate.
Props dimadin, ocean90.
See #35001.
Fixes#36410.
git-svn-id: https://develop.svn.wordpress.org/trunk@37162 602fd350-edb4-49c9-b593-d223f7449a82
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
git-svn-id: https://develop.svn.wordpress.org/trunk@37161 602fd350-edb4-49c9-b593-d223f7449a82
Adds `aria-describedby` attributes to the modal form fields after it
was partly restored in [37154].
Fixes#33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@37160 602fd350-edb4-49c9-b593-d223f7449a82
- Restore the bottom half of the modal.
- Make it always expanded and remove the toggle. It is used as advanced link options now, no need to have simple mode.
Props iseulde, adamsilverstein, azaozz.
Fixes#36359.
git-svn-id: https://develop.svn.wordpress.org/trunk@37154 602fd350-edb4-49c9-b593-d223f7449a82
Improves alignment with nav menus in the Customizer, fixing regression introduced in [36908].
See #35273.
Props sidati, westonruter.
Fixes#36353.
git-svn-id: https://develop.svn.wordpress.org/trunk@37153 602fd350-edb4-49c9-b593-d223f7449a82
Allow controls to specify the primary element to receive focus by adding a `control-focus` class.
Props adamsilverstein, westonruter.
Fixes#36337.
git-svn-id: https://develop.svn.wordpress.org/trunk@37152 602fd350-edb4-49c9-b593-d223f7449a82
The codex says that taxonomy names "should only contain lowercase letters and the underscore character", but that's not enforced. It's too late to enforce it, since some plugins haven't been following it and the official phpdoc doesn't mention this restriction.
git-svn-id: https://develop.svn.wordpress.org/trunk@37133 602fd350-edb4-49c9-b593-d223f7449a82
Takes into account whether the control supports `flex_width` and/or
`flex_height` and adjusts destination measurements accordingly.
Fixes#36318.
git-svn-id: https://develop.svn.wordpress.org/trunk@37113 602fd350-edb4-49c9-b593-d223f7449a82
We are escaping arguments, not commands, so we'd better use the semantically correct function, even though they are similar.
git-svn-id: https://develop.svn.wordpress.org/trunk@37094 602fd350-edb4-49c9-b593-d223f7449a82
The parsing of defaults assumes that $args will be an array. This solves it for Custom Logo the same way it is solved for custom-header and custom-background.
Props obenland.
Fixes#36332.
git-svn-id: https://develop.svn.wordpress.org/trunk@37092 602fd350-edb4-49c9-b593-d223f7449a82
When not misspelled, this hook is useful (and needed) for backward compatibility.
Unprops swissspidy.
Fixes#34988.
git-svn-id: https://develop.svn.wordpress.org/trunk@37084 602fd350-edb4-49c9-b593-d223f7449a82
Allows themes to specify the desired width and height of logos, and whether
that is flexible or not. Has the benefit of not having to generate a logo-sized
file for every image uploaded.
Props westonruter, celloexpressions.
Fixes#36255.
git-svn-id: https://develop.svn.wordpress.org/trunk@37077 602fd350-edb4-49c9-b593-d223f7449a82
This reverts part of [34659] due to excessive canonical problems it's caused in 4.4.x.
Remove the unit tests which are no longer supported.
This also removes the `is_feed()` code to avoid confusion - only pages & embeds will be redirected.
Merges [36280] and [36281] to trunk.
Props dd32.
See #21602, #35344.
git-svn-id: https://develop.svn.wordpress.org/trunk@37075 602fd350-edb4-49c9-b593-d223f7449a82
Also clarify that the `$args` parameters can accept a string (the default) in addition to an array.
Props ramiy.
See #36296.
git-svn-id: https://develop.svn.wordpress.org/trunk@37069 602fd350-edb4-49c9-b593-d223f7449a82
Also fixes inline `@see` formatting in appropriate places (summaries should not contain tags or markdown).
Props ramiy.
See #36296.
git-svn-id: https://develop.svn.wordpress.org/trunk@37068 602fd350-edb4-49c9-b593-d223f7449a82
Also add several missing at `@access` tags to other method DocBlocks and clarify parameter docs for `WP_Widget::form_callback()`.
Props raimy.
See #36298.
git-svn-id: https://develop.svn.wordpress.org/trunk@37064 602fd350-edb4-49c9-b593-d223f7449a82
Fixes issue where the Customizer preview window can appear to momentarily bounce to the top when being refreshed. Regression from [36532].
See #31195.
Fixes#36276.
git-svn-id: https://develop.svn.wordpress.org/trunk@37060 602fd350-edb4-49c9-b593-d223f7449a82
* Marks optional parameters as such
* Improves existing parameter descriptions for clarity
* Syntax improvements
See #36300.
git-svn-id: https://develop.svn.wordpress.org/trunk@37050 602fd350-edb4-49c9-b593-d223f7449a82
Resolves bug introduced in [r34572], in which editing a Post via the XMLRPC API with a draft post_status, where the post_status changes from draft->publish with a future post_date set for the publish action, will have the future post_date disregarded and the Post will be published immediately. The expected behavior is that the post_date is used to schedule the Post to be published in the future.
Fixes#35874.
Props redsweater, rachelbaker, DrewAPicture
git-svn-id: https://develop.svn.wordpress.org/trunk@37043 602fd350-edb4-49c9-b593-d223f7449a82
Ensures that `$flex_width` and `$flex_height` as specified on `WP_Customize_Cropped_Image_Control` will be honored when a crop is saved.
See #36255.
Fixes#34851.
git-svn-id: https://develop.svn.wordpress.org/trunk@37042 602fd350-edb4-49c9-b593-d223f7449a82
In [36533] CURIEs were added to the API responses for the link relation URIs, this makes
it a lot easier for clients to look up links by relation. That patch was functional, but
broke on edge cases such as embedded responses and collection items with links in the items.
This patch instead takes a less obtrusive approach by creating a new `get_compact_response_links`
to compliment `get_response_links` making both old and new functionality available.
Also the regex for curie relations has been relaxed to `.+` as rel names can have any uri-valid charector in it.
Fixes#34729.
git-svn-id: https://develop.svn.wordpress.org/trunk@37041 602fd350-edb4-49c9-b593-d223f7449a82
* Introduces `customize-selective-refresh-widgets` theme support feature and adds to themes.
* Introduces `customize_selective_refresh` arg for `WP_Widget::$widget_options` and adds to all core widgets.
* Remove `selective_refresh` from being a component that can be removed via `customize_loaded_components` filter.
* Add `WP_Customize_Widgets::get_selective_refreshable_widgets()` and `WP_Customize_Widgets::is_widget_selective_refreshable()`.
* Fix default `selector` for `Partial` instances.
* Implement and improve Masronry sidebar refresh logic in Twenty Thirteen and Twenty Fourteen, including preservation of initial widget position after refresh.
* Re-initialize ME.js when refreshing `Twenty_Fourteen_Ephemera_Widget`.
See #27355.
Fixes#35855.
git-svn-id: https://develop.svn.wordpress.org/trunk@37040 602fd350-edb4-49c9-b593-d223f7449a82
Updates .dashicons-googleplus (f462) and adds three new icons, .dashicons-move (f545), .dashicons-laptop (f547), and .dashicons-paperclip (f546).
Props liljimmi, melchoyce, empireoflight, aargh-a-knot.
See #34221.
git-svn-id: https://develop.svn.wordpress.org/trunk@37036 602fd350-edb4-49c9-b593-d223f7449a82
Adds example output to the DocBlock description based on default argument values.
Props ramiy for the initial patch.
See #32246.
git-svn-id: https://develop.svn.wordpress.org/trunk@37032 602fd350-edb4-49c9-b593-d223f7449a82
Confusion abound, the API index is the generic term `url` to display the `site_url`. New `home` key will display the `home_url` in the index as well.
Fixes#35647.
git-svn-id: https://develop.svn.wordpress.org/trunk@37031 602fd350-edb4-49c9-b593-d223f7449a82
When the browser test for diversity emoji was added in [36160], it included a workaround for Chrome not being able to compare `Uint8ClampedArray` objects directly, by converting them to a string. Unfortunately, Safari doesn't support the `Uint8ClampedArray.toString()` method correctly, so the test was incorrectly failing in Safari.
Fixes#36266 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@37028 602fd350-edb4-49c9-b593-d223f7449a82
When the `xmlrpc_enabled` filter was initially introduced in [21509], it was effectively intended to replace the `enable_xmlrpc' UI option, which only controlled whether authenticated XML-RPC methods were enabled, such as for publishing actions. This change clarifies the expected behavior and adds information about ways to more granularly control XML-RPC method and request behavior with related hooks.
Part props mensmaximus.
See #21509. Fixes#36055.
git-svn-id: https://develop.svn.wordpress.org/trunk@37025 602fd350-edb4-49c9-b593-d223f7449a82
- Remove `***` and `___` text pattern and support for spaces in `---`. The only `<hr>` text pattern is 3 or more dashes, no spaces.
- Remove the `*`, `**`, `_`, and `__` text patterns for bold and italic.
Fixes#33300;
git-svn-id: https://develop.svn.wordpress.org/trunk@37023 602fd350-edb4-49c9-b593-d223f7449a82
- Add back the bottom box-shadow on the Apply button.
- Shrink `.mce-btn.mce-primary` to compensate for the bottom box-shadow.
- Tighten up/reduce the margins between the buttons.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@37004 602fd350-edb4-49c9-b593-d223f7449a82
- Remove bottom box-shadow from the Apply button so it matches the rest.
- Change the tooltip for the cogwheel button to Link options.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@37001 602fd350-edb4-49c9-b593-d223f7449a82
HHVM does not currently support loading URLs in its port of Imagick.
Fixes `test_wp_crop_image_url()` failure introduced in [36916].
See #35973.
git-svn-id: https://develop.svn.wordpress.org/trunk@36996 602fd350-edb4-49c9-b593-d223f7449a82
- Add role=dialog and an aria-labelledby attribute to the modal container.
- Change the modal title to h1.
- Remove one ` ` that gets read out as `blank` by screen readers.
- Replace the Cancel link with a button.
- Clean up unused CSS.
Props afercia.
Fixes#30468.
git-svn-id: https://develop.svn.wordpress.org/trunk@36991 602fd350-edb4-49c9-b593-d223f7449a82
Eliminates JS logic (from [36698]) which attempted to do pure JS update while waiting for the selective refresh response to return. The duplicate JS logic lacked a re-implementation of the `image_downsize()` functionality available in PHP, and so the JS preview logic would fail to properly preview images that didn't have the exact theme image size generated. To keep the code DRY and to eliminate the momentary display of an improperly-sized image, the duplicated JS logic is now removed.
See #27355.
See #33755.
Fixes#36096.
git-svn-id: https://develop.svn.wordpress.org/trunk@36990 602fd350-edb4-49c9-b593-d223f7449a82
Due to the "exclude" support added in WP 4.4, single dashes were being
converted to "NOT LIKE '%%'" clauses, causing all searches to fail.
Props RomSocial, swissspidy.
Fixes#36195.
git-svn-id: https://develop.svn.wordpress.org/trunk@36989 602fd350-edb4-49c9-b593-d223f7449a82
When passed an invalid `'taxonomy'`, `get_terms()` will return a `WP_Error`
object. This object should not be blindly cast to an array. Instead, an empty
array should be returned, to indicate that no matching terms have been found.
Props virgodesign, sebastian.pisula.
Fixes#36227.
git-svn-id: https://develop.svn.wordpress.org/trunk@36988 602fd350-edb4-49c9-b593-d223f7449a82
- Remove unused user setting for wpLink.
- Remove redundant text and variable from wp_link_dialog().
Props afercia, azaozz.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36985 602fd350-edb4-49c9-b593-d223f7449a82
- Add audible confirmation when a link has been selected or inserted in the editor for both the inline dialog and the modal.
- Do not auto-search when the URL field is empty or already contains an URL.
- Remove a few redundant `tabindex`.
Props afercia, azaozz.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36984 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that no variables changed in the process of introducing `wp-admin/term.php`, improving overall backward compatibility.
Props Chouby for initial patch.
Fixes#34988.
git-svn-id: https://develop.svn.wordpress.org/trunk@36969 602fd350-edb4-49c9-b593-d223f7449a82
The plugin details modal can be invoked from several screens. There's now a new
`.open-plugin-details-modal` CSS class to be used in combination with the
`.thickbox` CSS class that adds everything needed for accessibility.
- Adds an ARIA role `dialog` and an `aria-label` attribute to the modal
- Adds a `title` attribute to the iframe inside the modal
- Constrains tabbing within the modal
- Restores focus back in a proper place when closing the modal
Also, improves a bit the native Thickbox implementation: it should probably be
replaced with some more modern tool but at least keyboard focus should be moved
inside the modal.
Fixes#33305.
git-svn-id: https://develop.svn.wordpress.org/trunk@36964 602fd350-edb4-49c9-b593-d223f7449a82
Makes sure custom logo functions work for other sites within a network.
Fixes a bug in `get_custom_logo()` where the correct logo was returned, but
linked to the wrong site.
H/t ocean90.
See #33755, #36086.
git-svn-id: https://develop.svn.wordpress.org/trunk@36949 602fd350-edb4-49c9-b593-d223f7449a82
Twitter moved its preferred oEmbed URL for single Tweets from api.twitter.com to publish.twitter.com. They also are deprecating XML responses.
Props niallkennedy.
Fixes#36197.
git-svn-id: https://develop.svn.wordpress.org/trunk@36946 602fd350-edb4-49c9-b593-d223f7449a82
`media-views.js` was updated, but the changes weren't added to `cropper.js`, which caused the `grunt precommit:js` job to incorrectly remove the changes from `media-views.js`.
Fixes#32783.
git-svn-id: https://develop.svn.wordpress.org/trunk@36931 602fd350-edb4-49c9-b593-d223f7449a82
Adds official upstream support for Unicode 8.0 emoji, as well as file size and performance improvements.
Fixes#36059.
git-svn-id: https://develop.svn.wordpress.org/trunk@36928 602fd350-edb4-49c9-b593-d223f7449a82
After [34170], some preview URLs that passed through `set_url_scheme()` no longer do so. We can restore that behavior by applying `set_url_scheme()` whenever `get_preview_post_link()` provides the URL.
Props danielbachhuber.
Fixes#35407.
git-svn-id: https://develop.svn.wordpress.org/trunk@36926 602fd350-edb4-49c9-b593-d223f7449a82
Removes case-sensitivity from Imagick feature detection within `WP_Image_Editor_Imagick::test()`.
This allows correct detection of Imagick support within HHVM.
Props markoheijnen, DuckDagobert.
Fixes#35973.
git-svn-id: https://develop.svn.wordpress.org/trunk@36916 602fd350-edb4-49c9-b593-d223f7449a82
Dissolves `WP_CustomLogo` and adopts a structure similar to custom header and background (See `_delete_attachment_theme_mod()`).
The option to hide header text only gets added if it’s not already part of custom header, and only if selectors have been registered when theme support for custom logos was declared. Themes can add `postMessage` support for it as well.
Example:
{{{
add_theme_support( 'custom-logo', array(
'size' => ‘large’,
'header-text' => array( 'site-title', 'site-description' ),
) );
}}}
See #33755.
git-svn-id: https://develop.svn.wordpress.org/trunk@36915 602fd350-edb4-49c9-b593-d223f7449a82
Keeps the control in the same place but allows for plugins and themes to place
other controls above it.
Props celloexpressions.
Fixes#35942.
git-svn-id: https://develop.svn.wordpress.org/trunk@36912 602fd350-edb4-49c9-b593-d223f7449a82
* Eliminates need to click more than one checkbox to have preferences saved.
* Adds debouncing to saving user-selected menu item properties.
* Also removes discrepancies between available nav menu item properties on admin page vs Customizer.
Fixes#35273.
Props afercia, westonruter.
git-svn-id: https://develop.svn.wordpress.org/trunk@36908 602fd350-edb4-49c9-b593-d223f7449a82
Makes the control easier to find, reduces visual clutter, and is more
consistent with Customizer UI conventions.
Props celloexpressions.
Fixes#35943.
git-svn-id: https://develop.svn.wordpress.org/trunk@36907 602fd350-edb4-49c9-b593-d223f7449a82
The class name is `wp-custom-logo` and it will be toggled by JS in the Customizer preview when the custom logo is added or removed.
See #33755.
Fixes#35945.
git-svn-id: https://develop.svn.wordpress.org/trunk@36903 602fd350-edb4-49c9-b593-d223f7449a82
* `get_blog_details()` now returns a `WP_Site` object.
* `clean_blog_cache()` is now called with a `WP_Site` object.
See #32450.
git-svn-id: https://develop.svn.wordpress.org/trunk@36894 602fd350-edb4-49c9-b593-d223f7449a82
- Progressive enhancement for optional compression improvements and stripping meta.
- Whitelist IPTC and XMP profiles to maintain Copyright and Rights Usage Terms.
- Whitelist EXIF profile to maintain orientation information. If handled on upload in the future, it can be stripped as well.
Fixes#33642. See #28634.
Props joemcgill, juliobox, ahockley, markoheijnen, adamsilverstein, wonderboymusic, mikeschroder.
git-svn-id: https://develop.svn.wordpress.org/trunk@36891 602fd350-edb4-49c9-b593-d223f7449a82
* Request full refresh if there are nav menu instances that lack partials for a changed setting.
* Restore `WP_Customize_Nav_Menus::$preview_nav_menu_instance_args` and `WP_Customize_Nav_Menus::export_preview_data()` from 4.3, and keeping a tally of all `wp_nav_menu()` calls regardless of whether they can use selective refresh.
* Ensure that all instances of `wp_nav_menu()` are tallied, regardless of whether they are made during the initial preview call or during subsequent partial renderings. Export `nav_menu_instance_args` with each partial rendering response just as they are returned when rendering the preview as a whole.
* Fix issues with Custom Menu widget where nav menu items would fail to render when switching between menus when a menu lacked items to begin with.
* Make sure the fallback behavior is invoked when the partial is no longer associated with a menu.
* Do fallback behavior to refresh preview when all menu items are removed from a menu.
Follows [36586].
See #27355.
Fixes#35362.
git-svn-id: https://develop.svn.wordpress.org/trunk@36889 602fd350-edb4-49c9-b593-d223f7449a82
The media library can contain files which aren't attached yet. When attaching a file you currently get "Media attachment reattached.", or the opposite "Media attachment detached.". That's redundant and can be inaccurate. It's also not easy to translate in some languages.
This change generalizes the strings to refer to a "media file" instead.
Props SergeyBiryukov, ocean90, netweb.
Fixes#36089.
git-svn-id: https://develop.svn.wordpress.org/trunk@36887 602fd350-edb4-49c9-b593-d223f7449a82
Also, adds better indication and attributes for the required form fields.
Moves some styles to `deprecated-media.css`.
Props andg, afercia.
Fixes#34944.
git-svn-id: https://develop.svn.wordpress.org/trunk@36879 602fd350-edb4-49c9-b593-d223f7449a82
This allows themes to directly override the default template. The order in which the template is retrieved is as follows: `embed-$post_type-$post_format.php` -> `embed-$post_type.php` -> `embed.php`.
The `embed_template` filter gets replaced by the dynamic `{$type}_template` filter in `get_query_template()`.
Props ChriCo, swissspidy.
See #34561. Fixes#34278.
git-svn-id: https://develop.svn.wordpress.org/trunk@36876 602fd350-edb4-49c9-b593-d223f7449a82
Specifically, run `do_action( 'edit-tags.php' );` on this new term edit page introduced in [36308]. Changes the GET param back to `tag_ID` and properly sets the screen base in `WP_Screen`.
See #34988.
git-svn-id: https://develop.svn.wordpress.org/trunk@36874 602fd350-edb4-49c9-b593-d223f7449a82
Changes the title attribute from `Embedded WordPress Post` to `"Post name" — site title`.
Props ramiy.
Fixes#35804.
git-svn-id: https://develop.svn.wordpress.org/trunk@36873 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow-up to [36604].
When processing dependencies `$this->group` will be the minimum of the script's registered group and all preceding siblings. This is wrong because only a scripts ancestors in the dependency chain should affect where it is loaded. Effectively `$this->group` introduced a form of global state which potentially corrupted the group of dependencies. Sorting covers up this problem.
The issue in #35873 was that script were not moving their dependencies to a lower group when necessary.
The fix:
* In `WP_Dependencies::all_deps()` pass the new `$group` value to `WP_Dependencies::all_deps()`. Previously the wrong value was passed because the parent script could have moved with `WP_Scripts::set_group()`.
* In `WP_Scripts::all_deps()` pass the `$group` parameter to `WP_Dependencies::all_deps()` so it doesn't always use `false` for `$group`. Same for `WP_Styles::all_deps()`.
Props stephenharris, gitlost.
Fixes#35956.
git-svn-id: https://develop.svn.wordpress.org/trunk@36871 602fd350-edb4-49c9-b593-d223f7449a82
The `media` handle is now used for `media.css` thus the stylesheet
for the old media UI needs a different handle name.
See #35229.
git-svn-id: https://develop.svn.wordpress.org/trunk@36869 602fd350-edb4-49c9-b593-d223f7449a82
`wp-login.php` uses `wp_safe_redirect()` for all redirects, even those that do not involve unsafe data from the request or referer.
When a user of a subdomain site attempts to login to a network site they do not have access to, the host in the redirect URL is treated as unsafe by `wp_safe_redirect()` as it has no immediate awareness as to which hosts are valid on the network. On a subdirectoy network, everything works as expected because the host is the same.
In this specific block of `wp-login.php`, all URLs are generated by WordPress and we can use `wp_redirect()` to handle the redirects. Users authenticating via other network sites will now be redirected properly. Hosts passed via the `redirect_to` query var will continue to be handled by `wp_safe_redirect()`.
Fixes#30598.
git-svn-id: https://develop.svn.wordpress.org/trunk@36867 602fd350-edb4-49c9-b593-d223f7449a82
Ensure that the Customizer gets bootstrapped with the pre-activated `theme` supplied in the `custom-header-crop` admin ajax requests.
Props faishal, rittesh.patel.
Fixes#32783.
git-svn-id: https://develop.svn.wordpress.org/trunk@36866 602fd350-edb4-49c9-b593-d223f7449a82
Tested scenarios include: using the default (which is the post type description), Setting a custom description for that individual menu item, and setting a custom description that is blank. Introduced in r35382.
Props Toro_Unit, mayukojpn, extendwings, jorbin.
Fixes#35324. See #16075.
git-svn-id: https://develop.svn.wordpress.org/trunk@36859 602fd350-edb4-49c9-b593-d223f7449a82
[36510] introduced a fix to allow users to save large menus on the Edit Menu screen (70+ menu items). The form data is stored as JSON which is used to inject the `$_POST` variable in the form submission handler. This injection was not setting form items with named array elements properly (e.g. `menu-locations[primary]`), which did not save theme location data in a large form.
Props keraweb.
See #14134.
git-svn-id: https://develop.svn.wordpress.org/trunk@36852 602fd350-edb4-49c9-b593-d223f7449a82
* Removes double `margin-bottom` from all the media controls.
* All media controls now send `{settingId}-attachment-data` messages to the preview when a media setting is updated so that the preview has access to the attachment data.
* Fixes receiving of `attachment-data` message for `custom_logo` which resulted in instant JS-applied preview not working. See #36096.
See #33755.
Fixes#35941.
git-svn-id: https://develop.svn.wordpress.org/trunk@36851 602fd350-edb4-49c9-b593-d223f7449a82
- Change the newly added `press_this_save_post_content` filter to `press_this_save_post` and pass the $post_data array to it.
- Remove the newly added `press_this_useful_html_elements`. It only runs in compatibility mode when a URL is typed by the user.
- Remove the `press_this_suggested_content` filter. It is redundant as the suggested HTML for the editor is already filtered by `press_this_suggested_html`.
- Add some more inline docs and rename couple of vars to make the code more readable.
Fixes#34455.
git-svn-id: https://develop.svn.wordpress.org/trunk@36848 602fd350-edb4-49c9-b593-d223f7449a82
Add a unit test to make sure the `$_old_files` array does not contain any current project files.
Props joemcgill, swissspidy.
Fixes#36083.
git-svn-id: https://develop.svn.wordpress.org/trunk@36843 602fd350-edb4-49c9-b593-d223f7449a82