Unmatched single quotation mark after the delete link href was introduced in r40655.
Props Chouby.
Fixes#9777.
git-svn-id: https://develop.svn.wordpress.org/trunk@40668 602fd350-edb4-49c9-b593-d223f7449a82
Adds omitted call to `renderWhenAnimationDone()` which was missed when this code was copied from the Text widget.
Amends [40656].
See #40750.
git-svn-id: https://develop.svn.wordpress.org/trunk@40660 602fd350-edb4-49c9-b593-d223f7449a82
When changing the user name in Users -> Your Profile, update the name displayed in the toolbar dynamically using JavaScript.
Props menakas, lukecavanagh, maguiar.
Fixes#40342.
git-svn-id: https://develop.svn.wordpress.org/trunk@40657 602fd350-edb4-49c9-b593-d223f7449a82
Fixes issue with MediaElement.js failing to build the player in an animating container that doesn't have established dimensions.
Also utilizes MediaElement.js for the video widget instead of using a native player.
See #32417.
Fixes#40750.
git-svn-id: https://develop.svn.wordpress.org/trunk@40656 602fd350-edb4-49c9-b593-d223f7449a82
Add a 'delete' link next to the update button on the term edit screen so you can delete a term while you are reviewing it's details.
Props cklosows, bradt, ocean90, johnbillion, DrewAPicture, ryan, MatheusGimenez, maguiar.
Fixes#9777.
git-svn-id: https://develop.svn.wordpress.org/trunk@40655 602fd350-edb4-49c9-b593-d223f7449a82
Natural-width buttons are better for translations, and don't feel as
overpowering as the half-width (and full-width) buttons.
Props melchoyce, timmydcrawford, afercia.
Fixes#40220.
git-svn-id: https://develop.svn.wordpress.org/trunk@40653 602fd350-edb4-49c9-b593-d223f7449a82
Fixes a bug where cached events & location data was not accessible because the
cache key could not be regenerated without latitude and longitude information.
Discovered and fixed during #wcber contributor day.
Props soean, kubik-rubik, obenland.
See #40702.
git-svn-id: https://develop.svn.wordpress.org/trunk@40651 602fd350-edb4-49c9-b593-d223f7449a82
These controls toggle the visibility of the update progress: they perform an action
therefore they should be buttons. Also:
- uses `aria-expanded` to communicate the toggle button state
- removes some inline JavaScript
- when clicking the toggle buttons, the progress details get moved with JavaScript after the button: this helps users of assistive technologies in finding them and makes the UI a bit more intuitive
Props Cheffheid, afercia.
See #26504.
Fixes#40453.
git-svn-id: https://develop.svn.wordpress.org/trunk@40646 602fd350-edb4-49c9-b593-d223f7449a82
- standardizes similar messages in core to always use `(opens in a new window)`
- adds translators comments
- hides the dashicons with `aria-hidden="true"`, see #40428Fixes#40733.
git-svn-id: https://develop.svn.wordpress.org/trunk@40643 602fd350-edb4-49c9-b593-d223f7449a82
The last time a new widget was introduced, Vuvuzelas were a thing, Angry Birds started taking over phones, and WordPress stopped shipping with Kubrick. Seven years and 17 releases without new widgets have been enough, time to spice up your sidebar!
Props westonruter, melchoyce, obenland, timmydcrawford, adamsilverstein, gonom9, wonderboymusic, Fab1en, DrewAPicture, sirbrillig, joen, matias, samikeijonen, afercia, celloexpressions, designsimply, michelleweber, ranh, kjellr, karmatosed.
Fixes#32417, #39993, #39994, #39995.
git-svn-id: https://develop.svn.wordpress.org/trunk@40640 602fd350-edb4-49c9-b593-d223f7449a82
Introduces option to `$return` parameter to return the attachment id created after a successful image sideload.
Props slbmeh, kawauso, alexkingorg, SergeyBiryukov, georgestephanis, DrewAPicture, nacin, trepmal, mattheu, kraftbj, whyisjake, dotancohen, MrGregWaugh, danielbachhuber.
Fixes#19629.
git-svn-id: https://develop.svn.wordpress.org/trunk@40597 602fd350-edb4-49c9-b593-d223f7449a82
Worth noting, as of WordPress 4.4, the Get Shortlink button is hidden by default
but it can be restored via filters.
Props Cheffheid.
See #26504.
Fixes#40448.
git-svn-id: https://develop.svn.wordpress.org/trunk@40578 602fd350-edb4-49c9-b593-d223f7449a82
Valid code is important not just to formally meet the specification, but also to
ensure user agents, including assistive technologies, can accurately interpret
and parse content. When HTML elements are not used in the recommended way,
user agents may render them in unexpected ways. It can also become a problem for
compatibility with older or even future browsers, devices, or other software.
See W3C WCAG 4.1.1.
Props takayukister, aryamaaru.
Fixes#34881.
git-svn-id: https://develop.svn.wordpress.org/trunk@40572 602fd350-edb4-49c9-b593-d223f7449a82
Also, restores the original design intent that was meant to "compact widget-tops
on smaller laptops, but not tablets".
See #27112.
Fixes#31476.
git-svn-id: https://develop.svn.wordpress.org/trunk@40569 602fd350-edb4-49c9-b593-d223f7449a82
Using the `focus` event on the date and time custom format fields made impossible
to navigate through all the form fields using only the keyboard without actually
selecting the custom format setting. Instead, using `click` and `input` preserves
the original functionality when using any kind of pointing or input device.
Fixes#40515.
git-svn-id: https://develop.svn.wordpress.org/trunk@40568 602fd350-edb4-49c9-b593-d223f7449a82
In the rare case this notice was displayed, it was unstyled. Uses the notice
error style to make it prettier and consistent with other no-js notices.
Also, some CSS clean-up.
Fixes#40529.
git-svn-id: https://develop.svn.wordpress.org/trunk@40556 602fd350-edb4-49c9-b593-d223f7449a82
Links used as UI controls that behave like buttons, should be buttons.
- changes the widgets "toggle", "Delete", and "Close" links to buttons
- uses `aria-expanded` to announce the state of the toggle buttons
- increases a bit the clickable area of the toggle
- ensures the "circular focus" doesn't get cut-off in some browsers by centering the toggle arrows
- uses a `<span>` element with an `aria-hidden` attribute to hide CSS generated font icons from assistive technologies
- standardizes on `.toggle-indicator:before` rather than `:after`
- changes two `#f00` reds in `#dc3232`, see #35622Fixes#31476.
git-svn-id: https://develop.svn.wordpress.org/trunk@40480 602fd350-edb4-49c9-b593-d223f7449a82
When using `is_super_admin()` in a non-multisite environment, the function is supposed to check for administrator capabilities. The process of querying all users and filtering them with that function can be optimized by only querying users with the administrator role instead.
Fixes#40406. See #37616.
git-svn-id: https://develop.svn.wordpress.org/trunk@40406 602fd350-edb4-49c9-b593-d223f7449a82
Prior to this change, a mix of `is_super_admin()` calls and `manage_network` capability checks was used to determine whether the current user could upgrade the network. With this changeset a dedicated capability is introduced that allows more granular handling.
Props dhanendran for the original patch.
Fixes#39205. See #37616.
git-svn-id: https://develop.svn.wordpress.org/trunk@40404 602fd350-edb4-49c9-b593-d223f7449a82
Introduces `WP_Customize_Panel::$auto_expand_sole_section` property which allows panels to opt-in to the behavior, which the Widgets panel is made to do by default.
Props delawski, westonruter, melchoyce.
Fixes#37471.
git-svn-id: https://develop.svn.wordpress.org/trunk@40395 602fd350-edb4-49c9-b593-d223f7449a82
This is a wrapper around the checks for the `DISALLOW_FILE_MODS` constant to determine whether file modifications are disallowed.
Props MaximeCulea.
Fixes#38673.
git-svn-id: https://develop.svn.wordpress.org/trunk@40394 602fd350-edb4-49c9-b593-d223f7449a82
`setup_network` is a new meta capability that brings more granular control over the permissions to setup a multisite environment. In a non-multisite environment it falls back to `manage_options` while in a multisite it falls back to `manage_network_options`. The introduction of this capability furthermore allows replacing an `is_super_admin()` check.
Props ashokkumar24 for the original patch.
Fixes#39206. See #37616.
git-svn-id: https://develop.svn.wordpress.org/trunk@40390 602fd350-edb4-49c9-b593-d223f7449a82
Otherwise CSS specific to the site's locale would be applied, even though the customizer is displayed in the user's locale.
See #29783.
Fixes#40271.
git-svn-id: https://develop.svn.wordpress.org/trunk@40368 602fd350-edb4-49c9-b593-d223f7449a82
For better accessibility, expandable panels should be placed immediately after
the control that expands them. This change moves the Media Library inline
uploader up, right after the "Add New" button, also introducing consistency with
the Plugin and Theme uploaders.
Adds a proper ARIA role on the button and an `aria-expanded` attribute to give
better feedback to assistive technologies users about the uploader's expanded state.
Improves the focus handling when closing the uploader, improves the focus style
and color contrast ratio of the uploader "close" button.
Props mantismamita, karmatosed, adamsilverstein, afercia.
Fixes#37188.
git-svn-id: https://develop.svn.wordpress.org/trunk@40359 602fd350-edb4-49c9-b593-d223f7449a82
After [40059] the CSS class `button-link` uses `text-align: left` by default.
This change now requires to limit as much as possible the use of `button-link`
to controls that should really look like links and to explicitly set
`text-align: center` in a few other cases.
Fixes#39983.
git-svn-id: https://develop.svn.wordpress.org/trunk@40358 602fd350-edb4-49c9-b593-d223f7449a82
Always passes the complete `position` object to the jQuery autocomplete widget.
Also checks if an autocomplete instance already exists on the Bulk Edit textarea.
Props davidbenton.
Fixes#40242.
git-svn-id: https://develop.svn.wordpress.org/trunk@40357 602fd350-edb4-49c9-b593-d223f7449a82
This brings consistency to the order in which roles are displayed in the `Roles` dropdown when editing users.
Props bor0
Fixes#40162
git-svn-id: https://develop.svn.wordpress.org/trunk@40323 602fd350-edb4-49c9-b593-d223f7449a82
This extends the existing behavior which only showed a message only when there were no widget areas rendered in the preview. The number of non-rendered widget areas is indicated. Also removes needles deletion of `wp.customize.Widgets.data.l10n` property which hindered plugins.
See #33567, #33052.
Fixes#39087.
git-svn-id: https://develop.svn.wordpress.org/trunk@40312 602fd350-edb4-49c9-b593-d223f7449a82
Improve jsdoc for `onChangeActive` function. Restores fix from [34557] which got dropped in [38648].
Props dlh, westonruter.
See #34391, #33509.
Fixes#39430.
git-svn-id: https://develop.svn.wordpress.org/trunk@40304 602fd350-edb4-49c9-b593-d223f7449a82
This prevents creating page without any content when the options are populated with an empty string.
Props shadyvb.
Fixes#40036.
git-svn-id: https://develop.svn.wordpress.org/trunk@40296 602fd350-edb4-49c9-b593-d223f7449a82
Since support for PDF previews were added in [38949], it's possible
that the generated image file could overwrite an existing image file
with the same name. This uses `wp_unique_filename()` to avoid this
issue and adds a '-pdf' identifier on the end of filenames.
Props gitlost, derosj, mikeschroder, joemcgill.
Fixes#39875. See #31050.
git-svn-id: https://develop.svn.wordpress.org/trunk@40130 602fd350-edb4-49c9-b593-d223f7449a82
Add QUnit tests for the parsing of custom namespace routes. Add a custom schema fixture based on the `wp-js-widgets` plugin. Test that the client can parse the widget namespace in the schema and correctly construct the expected group of models and collections. Also includes a small unrelated QUnit fix to ensure nav-menu test passes when it is loaded without its tests executing as well as a small jshint fix, adding a missing semicolon since [40107].
Props jnylen0.
Fixes#39561.
git-svn-id: https://develop.svn.wordpress.org/trunk@40109 602fd350-edb4-49c9-b593-d223f7449a82
Enable history support for the new theme screen, including navigating theme details and closing the details modal. Theme selection is now also bookmark-able, so linking to a URL like `/wp-admin/theme-install.php?theme=twentyseventeen` correctly opens the theme preview.
Props dd32.
Fixes#36613.
git-svn-id: https://develop.svn.wordpress.org/trunk@40107 602fd350-edb4-49c9-b593-d223f7449a82
For UX and accessibility reasons, it's better to always avoid playing videos automatically.
Props bor0.
Fixes#39560.
git-svn-id: https://develop.svn.wordpress.org/trunk@40089 602fd350-edb4-49c9-b593-d223f7449a82
Prevent a potential error condition if Backbone history is started by a plugin or theme before core tries to start it.
Props tfrommen.
Fixes#39612.
git-svn-id: https://develop.svn.wordpress.org/trunk@40076 602fd350-edb4-49c9-b593-d223f7449a82
Updates `.button-link` adding color and underline to make link-like buttons look
like links by default. Introduces `.button-link-delete` as a modifier, stackable
CSS class for red button-links.
Props Cheffheid, afercia.
See #34242.
Fixes#35126.
git-svn-id: https://develop.svn.wordpress.org/trunk@40052 602fd350-edb4-49c9-b593-d223f7449a82
Fix a JavaScript error when the media edit screen is loaded directly via a url such as `/wp-admin/post.php?post={post_id}&action=edit&image-editor`. Add a check in `imgLoaded` for `this.hold.sizer` which is set up during initialization and required for the cropping tool. Call `init` if this is undefined.
Props NoseGraze.
Fixes#38138.
git-svn-id: https://develop.svn.wordpress.org/trunk@40020 602fd350-edb4-49c9-b593-d223f7449a82
- Add option to force a sandbox iframe in wpview.
- Use it to show the embedded post preview.
- Remove the deprecated `wpembed` plugin.js
Fixes#39513.
git-svn-id: https://develop.svn.wordpress.org/trunk@40019 602fd350-edb4-49c9-b593-d223f7449a82
Whitespace is trimmed from titles in PHP when saved in any case, so this aligns the client-side behavior with what happens on the server.
Amends [38618].
See #38015.
Fixes#39600.
git-svn-id: https://develop.svn.wordpress.org/trunk@39994 602fd350-edb4-49c9-b593-d223f7449a82
In multisite, the notice is displayed to users that have the `manage_network_options` capability. In non-multisite, the notice is displayed to users with the `manage_options` capability.
Props Dhaval Parekh.
Fixes#39207. See #37616.
git-svn-id: https://develop.svn.wordpress.org/trunk@39947 602fd350-edb4-49c9-b593-d223f7449a82
Prior to this change, a super admin user that is added to a site who they are already a member of would still get reinvited.
Props supercoder.
Fixes#39220. See #37616.
git-svn-id: https://develop.svn.wordpress.org/trunk@39946 602fd350-edb4-49c9-b593-d223f7449a82
Remove the mention of `secondary` and `delete` classes as core values, add `small` and `large`.
Props afercia.
Fixes#23477.
git-svn-id: https://develop.svn.wordpress.org/trunk@39936 602fd350-edb4-49c9-b593-d223f7449a82
The checks were introduced in [22256] to prevent user settings to be set for super admins that were not a member of the current site. However the latter should apply to any kind of user, so the `is_super_admin()` check is redundant. Furthermore, removing these checks is necessary for the ongoing effort to get rid of `is_super_admin()` checks in general.
Props chandrapatel for initial patch.
Fixes#39199. See #37616.
git-svn-id: https://develop.svn.wordpress.org/trunk@39932 602fd350-edb4-49c9-b593-d223f7449a82
Fire a `menu-item-added` event after a menu item is added to the DOM. Fire a `menu-removing-item` event before a menu item is removed from the DOM. Enables hooking into and responding to menu changes.
Props welcher, adamsilverstein.
Fixes#31218.
git-svn-id: https://develop.svn.wordpress.org/trunk@39928 602fd350-edb4-49c9-b593-d223f7449a82
If index lengths change in table definitions, we don't recreate the index - instead, we throw a database error, as `dbDelta()` tries to create a new index with the same name.
It's better to leave the index as is, MySQL doesn't have an efficient process for resizing indices, and dropping/creating is a slow process which we don't want to trigger automatically.
Fixes#34870.
git-svn-id: https://develop.svn.wordpress.org/trunk@39921 602fd350-edb4-49c9-b593-d223f7449a82
This brings all locale-specific site settings closer together and prevents the language setting from being pushed down by unrelated settings added by plugins.
Props johnjamesjacoby.
Fixes#38562.
git-svn-id: https://develop.svn.wordpress.org/trunk@39885 602fd350-edb4-49c9-b593-d223f7449a82
Remove `@global` tags as well as they are not suited to describe a function parameter and are documented in the description of the actions.
Props keesiemeijer.
Fixes#39527.
git-svn-id: https://develop.svn.wordpress.org/trunk@39755 602fd350-edb4-49c9-b593-d223f7449a82