`wp_dropdown_users()` contains a whitelist of function params that are
passed through to `get_users()`. `role`, `role__in`, and `role__not_in`
have now been added to this whitelist.
Props sillybean.
Fixes#38135.
git-svn-id: https://develop.svn.wordpress.org/trunk@38651 602fd350-edb4-49c9-b593-d223f7449a82
Deprecate/remove `WP_Customize_Manager::customize_preview_html5()` and remove `document.head` polyfill, both of which were only in place for IE8 support.
Props ryankienstra, westonruter.
Fixes#38021.
git-svn-id: https://develop.svn.wordpress.org/trunk@38649 602fd350-edb4-49c9-b593-d223f7449a82
Removes contents for sections and panels from being logically nested (in the DOM) in order to eliminate many issues related to using `margin-top` hacks. The element containing the link to expand the content element for panels and sections is now a sibling element to its content element: the content is removed from being nested at initialization. The content element is now available in a `contentContainer` property whereas the head element (containing the link to open the construct) is in a `headContainer` property. The existing `container` property is now a jQuery collection that contains both of these elements. Since the head element is no longer in an ancestor element to the `content` element, the `aria-owns` property is now used to maintain the relationship between the `headContainer` and the `contentContainer`. These changes are also accompanied by an improvement to the animation performance for the sliding panes.
Props delawski, celloexpressions.
Fixes#34391.
Fixes#34344.
Fixes#35947.
git-svn-id: https://develop.svn.wordpress.org/trunk@38648 602fd350-edb4-49c9-b593-d223f7449a82
Bulk action filtering was introduced in 3.1, but only to remove default bulk actions, not add new ones.
Bulk actions can now be registered for all admin list table dropdowns via the `bulk_actions-{get_current_screen()->id}` filter. Handling custom bulk actions can be performed in the corresponding and newly introduced `handle_bulk_actions-${get_current_screen()->id}` filter.
Props scribu, flixos90, Veraxus.
See #16031.
git-svn-id: https://develop.svn.wordpress.org/trunk@38647 602fd350-edb4-49c9-b593-d223f7449a82
In rare circumstances, for example buttons with icons and no visible text,
`user-select: none;` may trigger a bug that happens only when using Safari and
VoiceOver and doesn't allow focusable elements to receive focus correctly.
Worth reminding `user-select: none;` is a non-standard property and should be
used with care especially now that `::selection` is almost universally supported.
Fixes#37589.
git-svn-id: https://develop.svn.wordpress.org/trunk@38642 602fd350-edb4-49c9-b593-d223f7449a82
- adds "Apply Filters" and "Clear" at the end of the form
- changes the "Feature Filter", "Apply Filters", "Clear", and "Edit" links in `<button>` elements
- removes a leftover from [27963]
- clarifies one button text and adds an `aria-label` attribute
- adds a `wp.a11y.speak()` message when clicking on "Apply Filters" and no features are selected
Fixes#38086.
git-svn-id: https://develop.svn.wordpress.org/trunk@38640 602fd350-edb4-49c9-b593-d223f7449a82
Restore `get_current_site()` to a multisite only function. Providing this in single site may be a possibility in the future, but should have a dedicated ticket and discussion.
See #37699.
git-svn-id: https://develop.svn.wordpress.org/trunk@38636 602fd350-edb4-49c9-b593-d223f7449a82
`register_setting` can now be passed an array arguments to specify meta-data about the setting,
much like using the `register_meta` API. Of note, it will now accept a `show_in_rest` arg to
hint the inclusion of the setting in the REST API. `get_registered_settings()` is available
as a utility to get all registered settings.
Props rmccue, aaroncampbell.
Fixes#37885.
git-svn-id: https://develop.svn.wordpress.org/trunk@38635 602fd350-edb4-49c9-b593-d223f7449a82
This adds a new link to visit the post type archive if the post type supports it. Also introduces a new `view_items` label to `get_post_type_labels()`.
Props paulwilde, akibjorklund, swissspidy.
Fixes#34113.
git-svn-id: https://develop.svn.wordpress.org/trunk@38634 602fd350-edb4-49c9-b593-d223f7449a82
The manual query for the main network ID can now be replaced with a cached `get_networks()` query. This allows us to eliminate the `primary_network_id` cache key entirely.
Props spacedmonkey.
Fixes#37218.
git-svn-id: https://develop.svn.wordpress.org/trunk@38632 602fd350-edb4-49c9-b593-d223f7449a82
Previously, `compact()` provided a non existent `$join` and could cause confusion for anyone attempting to extend `WP_Site_Query` with their own tables. This aligns with the current behavior in `WP_Network_Query`.
Props johnjamesjacoby.
Fixes#37922.
git-svn-id: https://develop.svn.wordpress.org/trunk@38631 602fd350-edb4-49c9-b593-d223f7449a82
Uses feature detection for `Array.prototype.indexOf` since it is not implemented in IE8.
Props ryankienstra.
See #38021.
git-svn-id: https://develop.svn.wordpress.org/trunk@38627 602fd350-edb4-49c9-b593-d223f7449a82
This tweaks the padding of the text inputs in image settings boxes on
image edit screens to match the height of the scale button.
Props eliorivero.
Fixes#37806.
git-svn-id: https://develop.svn.wordpress.org/trunk@38626 602fd350-edb4-49c9-b593-d223f7449a82
This applies a new private function, `_filter_query_attachment_filenames()`,
to the `post_clauses` filter hook during `wp_ajax_query_attachments()` and
`wp_edit_attachments_query_vars()` to include `_wp_attached_file` post meta
in search queries performed from the media library or in a `WP_Media_List_Table`.
Props wonderboymusic, DrewAPicture, joemcgill, swissspidy.
Fixes#22744.
git-svn-id: https://develop.svn.wordpress.org/trunk@38625 602fd350-edb4-49c9-b593-d223f7449a82
If there are no pages when the customizer is opened, the `static_front_page` section will be hidden. As soon as a page is created in the customizer session, the `static_front_page` section will be revealed. Previously the section would not be registered if there were no pages. Page stubs created via nav menus will appear in the `dropdown-pages` controls for `page_for_posts` and `page_on_front`, and such page stubs will thus cause the `static_front_page` section to appear. Plugins that facilitate page creation in the customizer by filtering `get_pages` will also cause the section to appear.
See #34923.
Fixes#38013.
git-svn-id: https://develop.svn.wordpress.org/trunk@38624 602fd350-edb4-49c9-b593-d223f7449a82
This change means that after entering their site's settings upon installation, users are immediately logged in and redirected to the admin dashboard, instead of being presented with the 'Success!' screen and then being asked to log in. This reduces friction and reduces the number of steps for installation.
Fixes#34084
git-svn-id: https://develop.svn.wordpress.org/trunk@38619 602fd350-edb4-49c9-b593-d223f7449a82
Use original title as placeholder for label and in control title. Prevent original title from overriding empty label in initial setting values.
Fixes#38015.
git-svn-id: https://develop.svn.wordpress.org/trunk@38618 602fd350-edb4-49c9-b593-d223f7449a82
The `submitdelete` CSS class is used in various places across the admin for some
"red" action links. It is worth simplifying this rule for further improvements
related to color contrast.
- simplifies a non-standard styling for the "Remove/Cancel" links in the Menus screen
- underlines all the "Move to trash/Delete" red links in all the Publish meta boxes
- fixes CSS classes usage for all the Publish meta boxes primary buttons
- fixes broken layout for the old Link Manager publish meta box
Props karmatosed, hugobaeta, monikarao, afercia.
Fixes#37969, #37018. See #37448, #37138, #27314.
git-svn-id: https://develop.svn.wordpress.org/trunk@38616 602fd350-edb4-49c9-b593-d223f7449a82
Preserves spaces and generally creates more accurate, cleaner titles from filenames of uploaded media.
Props joemcgill.
Fixes#37989.
git-svn-id: https://develop.svn.wordpress.org/trunk@38614 602fd350-edb4-49c9-b593-d223f7449a82
Post Passwords are incredibly inflexible. One Password per site at a time and other limitations that can't really be changed without a backwards compatibility break. This adds the ability for sites to change the password behavior such as doing per post passwords or allowing multiple passwords to be set in a browser. The possibilities are YUGE.
Additionally, it allows for a behavior other than returning a html form when a password is needed. This is important for non website use cases (such as in a restful API).
Fixes#38056. See #16483.
Props rmccue.
git-svn-id: https://develop.svn.wordpress.org/trunk@38603 602fd350-edb4-49c9-b593-d223f7449a82
The 4px border pattern is found in a number of places across the admin, including plugins, notices, and Press This.
props celloexpressions, folletto, hugobaeta.
see #29158.
git-svn-id: https://develop.svn.wordpress.org/trunk@38602 602fd350-edb4-49c9-b593-d223f7449a82
Give developers the opportunity to reject incoming data without using the validation callback. It also enables us to do sanitization and validation in one function in instances where this could be useful.
Props websupporter, rmccue.
Fixes#37560.
git-svn-id: https://develop.svn.wordpress.org/trunk@38601 602fd350-edb4-49c9-b593-d223f7449a82