- When saving a draft change the text of the Save Draft button to Saving...
- On success, hide the button and show Edit Post link in its place. If the user focuses the title or the editor, hide the link and show the button again.
Fixes#31923.
git-svn-id: https://develop.svn.wordpress.org/trunk@32092 602fd350-edb4-49c9-b593-d223f7449a82
Headers are currently keyed by the basename of the image, see #31786. When two images have the same key only one image will be listed and the current image can be empty in the header control.
To prevent this we now fall back to the raw current header image if the image isn't in `_wpCustomizeHeader.uploads`.
props sirbrillig.
fixes#31742.
git-svn-id: https://develop.svn.wordpress.org/trunk@32091 602fd350-edb4-49c9-b593-d223f7449a82
Use `$_SERVER['HTTP_HOST']` and `$_SERVER['REQUEST_URI']` instead of `site_url()` and `$_SERVER['REQUEST_URI']`.
fixes#31896.
git-svn-id: https://develop.svn.wordpress.org/trunk@32086 602fd350-edb4-49c9-b593-d223f7449a82
The QS method added in [32067] and modified in [32080] doesn't work when the user changes the tab inside the modal. Instead, let's use the parent window's location.
Fixes#31739
git-svn-id: https://develop.svn.wordpress.org/trunk@32082 602fd350-edb4-49c9-b593-d223f7449a82
`.custom-background` should only be added if a background color or an image divert from their defaults. This behavior exists already in `_custom_background_cb()`.
props slobodanmanic, nitkr, valendesigns, obenland.
see [21054], [21001].
fixes#28687.
git-svn-id: https://develop.svn.wordpress.org/trunk@32081 602fd350-edb4-49c9-b593-d223f7449a82
This fixes two problems. TB seems to sometimes strip window.location.search variables after tb ones, so we need to move it forward. Also fixes logic error.
See #31739
git-svn-id: https://develop.svn.wordpress.org/trunk@32080 602fd350-edb4-49c9-b593-d223f7449a82
Captions containing only whitespace trick `image_add_caption()` into thinking
a caption is required, but the empty caption text confuses wpeditimage into
stripping the 'align' class specified by the user.
Fixes#21848.
git-svn-id: https://develop.svn.wordpress.org/trunk@32079 602fd350-edb4-49c9-b593-d223f7449a82
This particularly fixes the attachment and plugin details modals, but also improves other modals such as wpLink and interim login.
props iseulde.
fixes#31609, #31611. see #31610, #31612.
git-svn-id: https://develop.svn.wordpress.org/trunk@32073 602fd350-edb4-49c9-b593-d223f7449a82
When an incomplete header is provided (eg, 'From' with an email address but no
name), ensure that the WP defaults are filled in properly.
Props valendesigns.
Fixes#30266.
git-svn-id: https://develop.svn.wordpress.org/trunk@32070 602fd350-edb4-49c9-b593-d223f7449a82
We don't have links to update a single plugin on wp-admin/update-core.php so we can't initiate a shiny update there.
Fixes#31739
git-svn-id: https://develop.svn.wordpress.org/trunk@32067 602fd350-edb4-49c9-b593-d223f7449a82
A number of libraries that we include in core come with minified versions that we also include in core. The build process shouldn't override them.
Fixes#31477
Props ocean90, jorbin
git-svn-id: https://develop.svn.wordpress.org/trunk@32066 602fd350-edb4-49c9-b593-d223f7449a82
Pass the expected single value, rather than object, when recursively calling `global_terms()`.
Props hauvong.
See #31914, Fixes#31149.
git-svn-id: https://develop.svn.wordpress.org/trunk@32064 602fd350-edb4-49c9-b593-d223f7449a82
The plugin detail modal can contain a link to update a plugin. When it does, we should initiate a shiny update.
This relies upon postMessage which isn't available in all browsers, specifically it isn't in IE versions below 8 so this is going to be a progressive enhancement that some small percentage of users will miss out on. These are the same users that can't use the customizer.
Fixes#31739
git-svn-id: https://develop.svn.wordpress.org/trunk@32062 602fd350-edb4-49c9-b593-d223f7449a82
Plugins need to be able to do actions when a shiny update completes. While we don't have complete javascript actions and filters, we do have jQuery events that we can fire to assist plugin authors.
See #31819
git-svn-id: https://develop.svn.wordpress.org/trunk@32061 602fd350-edb4-49c9-b593-d223f7449a82
- Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix.
- Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing.
- Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys.
Fixes#31895.
git-svn-id: https://develop.svn.wordpress.org/trunk@32058 602fd350-edb4-49c9-b593-d223f7449a82
This was broken since 4.0 and the introduction of user session tokens. The nonces are now tied to session tokens as opposed to user IDs, and thus they change with each re-login.
Custom nonces can be added through the `customize_refresh_nonces` filter. On a successful refresh request the JavaScript API will trigger a `nonce-refresh` event. See widget's update nonce as an example.
props westonruter for initial patch.
fixes#31294.
git-svn-id: https://develop.svn.wordpress.org/trunk@32054 602fd350-edb4-49c9-b593-d223f7449a82
When a shiny update is happening or pending, we should make sure users don't accidentally leave the page. This simple notification should help prevent users from accidentally not updating when they want to update.
See #31769
Props ericlewis and adamsilverstein for initial patch
git-svn-id: https://develop.svn.wordpress.org/trunk@32052 602fd350-edb4-49c9-b593-d223f7449a82