Commit Graph

35231 Commits

Author SHA1 Message Date
Boone Gorges
cf6f354fa8 Allow 'role' parameters to be passed to wp_dropdown_users().
`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
2016-09-25 17:44:24 +00:00
Boone Gorges
cc807d5a91 Pass comment ID to get_page_of_comment filter.
Introduced in [34808].

Props zhildzik.
Fixes #38155.

git-svn-id: https://develop.svn.wordpress.org/trunk@38650 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-25 17:32:37 +00:00
Weston Ruter
b12ff9487d Customize: Opt to disable IE8 support via conditional comments instead of using unreliable Array.prototype.indexOf feature detection.
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
2016-09-25 04:34:34 +00:00
Weston Ruter
f3e8e7735d Customize: Re-architect and harden panel/section UI logic.
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
2016-09-23 22:22:09 +00:00
Eric Andrew Lewis
c75fb5e9ca Allow custom bulk actions in admin list tables.
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
2016-09-23 20:32:48 +00:00
Sergey Biryukov
8bc6917cc3 I18N: Add support for Serbian crossed D in remove_accents().
Props Krstarica for the report.
Fixes #38078.

git-svn-id: https://develop.svn.wordpress.org/trunk@38646 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-23 00:06:24 +00:00
Sergey Biryukov
1c2d321ed3 Docs: Add home and commentpaged as accepted values for user_trailingslashit filter.
Props sebastian.pisula.
Fixes #37734.

git-svn-id: https://develop.svn.wordpress.org/trunk@38645 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-22 22:53:01 +00:00
Sergey Biryukov
42dfc674b7 Docs: Add documentation for wp-admin/js/inline-edit-tax.js.
Props atimmer, boblinthorst.
Fixes #37571.

git-svn-id: https://develop.svn.wordpress.org/trunk@38644 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-22 18:49:26 +00:00
Sergey Biryukov
b34a53e715 Docs: Add documentation for wp-admin/js/postbox.js.
Props atimmer, andizer.
Fixes #37365.

git-svn-id: https://develop.svn.wordpress.org/trunk@38643 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-22 18:46:34 +00:00
Andrea Fercia
0a23a8405d Accessibility: Fix the Customizer available menu items toggles focus for Safari and VoiceOver.
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
2016-09-22 14:58:41 +00:00
Sergey Biryukov
c259123537 Docs: Correct @see entry for clean_url().
Props rabmalin.
Fixes #38126.

git-svn-id: https://develop.svn.wordpress.org/trunk@38641 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-22 09:39:15 +00:00
Andrea Fercia
e5fc724dd0 Accessibility: Add Themes Feature Filter form improvements.
- 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
2016-09-21 17:53:29 +00:00
ocean90
005a01da4a Comments: Revert [38298].
Instead use the correct comparison operator which was changed in [38297].

Fixes #37416.

git-svn-id: https://develop.svn.wordpress.org/trunk@38639 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-21 17:37:02 +00:00
Andrea Fercia
9bfbc3570b Administration: Fix the main background color for the Light color scheme.
Props trepmal.
Fixes #38004.


git-svn-id: https://develop.svn.wordpress.org/trunk@38638 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-21 17:35:42 +00:00
Sergey Biryukov
9ee1f662cb Editor: Improve post.js documentation.
Props jipmoors, boblinthorst.
Fixes #38118.

git-svn-id: https://develop.svn.wordpress.org/trunk@38637 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-21 08:56:28 +00:00
Jeremy Felt
2515aab673 Multisite: Revert [38388].
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
2016-09-20 21:38:08 +00:00
Joe Hoyle
201f9d2864 Options: Build out register_setting like register_meta.
`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
2016-09-20 20:51:18 +00:00
Pascal Birchler
acb43ecc0b Toolbar: Add a 'View Posts' link to the toolbar when on the post listing screen.
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
2016-09-20 20:01:55 +00:00
Dominik Schilling (ocean90)
debaea8a7c Multisite: Show always domain and path when deleting a site.
Add a missing translators comment.

Props ian.edington.
Fixes #37309.

git-svn-id: https://develop.svn.wordpress.org/trunk@38633 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 19:54:26 +00:00
Jeremy Felt
576a4cba5e Multisite: Use get_networks() in get_main_network_id().
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
2016-09-20 18:46:52 +00:00
jeremyfelt
e0ef4132fe Multisite: Provide $join as a possible SQL clause to the sites_clauses filter.
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
2016-09-20 17:48:42 +00:00
Jeremy Felt
9bb6bd0f89 Multisite: Add annotations for extended WP_Site properties.
Props ryanplas.
Fixes #37932.


git-svn-id: https://develop.svn.wordpress.org/trunk@38630 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 17:21:03 +00:00
Sergey Biryukov
d9e0272707 Docs: Correct the description of {$taxonomy}_term_new_form_tag hook, making it more consistent with other *_form_tag hooks.
Props BjornW.
Fixes #38104.

git-svn-id: https://develop.svn.wordpress.org/trunk@38629 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 13:32:33 +00:00
Dominik Schilling (ocean90)
a679078121 Customize: Add wp-util as a dependency for customize-controls.
Fixes #38107.

git-svn-id: https://develop.svn.wordpress.org/trunk@38628 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-20 13:23:49 +00:00
Weston Ruter
3521b2f30f Customize: Remove IE8 access to customizer to discontinue support.
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
2016-09-20 04:01:58 +00:00
Joe McGill
c953f0aae0 Media: Align input and button heights in attachment details.
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
2016-09-20 02:17:54 +00:00
Joe McGill
4da705a7db Media: Make media library searchable by filename.
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
2016-09-20 01:44:07 +00:00
Weston Ruter
7079459b77 Customize: Let static_front_page section be contextually active based on whether there are any published pages.
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
2016-09-20 00:46:54 +00:00
Sergey Biryukov
849c5de6d5 Docs: Correct two references to plugins in the $args parameter description for themes_api().
Props hideokamoto.
Fixes #37939.

git-svn-id: https://develop.svn.wordpress.org/trunk@38623 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-19 16:45:44 +00:00
Sergey Biryukov
b733c05fbc Docs: Correct a comment and @return entry in WP_Upgrader::create_lock().
Props markshep.
Fixes #38089.

git-svn-id: https://develop.svn.wordpress.org/trunk@38622 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-18 20:15:46 +00:00
Boone Gorges
acd49dc883 Pass taxonomy name to actions in term-relationship CRUD functions.
Props Takahashi_Fumiki.
Fixes #38006.

git-svn-id: https://develop.svn.wordpress.org/trunk@38621 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-18 18:52:56 +00:00
Sergey Biryukov
e7def1dae2 XML-RPC: Avoid a PHP notice in ::pingback_ping() if page title was not found.
Props RedSand.
Fixes #36727.

git-svn-id: https://develop.svn.wordpress.org/trunk@38620 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-18 14:25:13 +00:00
John Blackbourn
bc0a601889 Upgrade/Install: Automatically log users in after installation.
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
2016-09-18 11:41:53 +00:00
Weston Ruter
87dc042623 Customize: Ensure nav menu items lacking a label use the title from the original object.
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
2016-09-17 21:49:49 +00:00
Andrea Fercia
998c06222f Plugins: style the primary action link in the non-js "Installing Plugin" page.
Props curdin, ericlewis, melchoyce, karmatosed.
Fixes #36430.


git-svn-id: https://develop.svn.wordpress.org/trunk@38617 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-17 16:22:03 +00:00
Andrea Fercia
aa021ff89f Accessibility: Standardize the remove/delete/cancel links in the Menus screen and Publish meta boxes.
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
2016-09-17 15:38:40 +00:00
Aaron D. Campbell
6eb3e0bf5f Media: Improved media titles when created from filename.
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
2016-09-17 05:41:27 +00:00
Pascal Birchler
a803a33c04 Menus: Use strict comparison for the condition added in [38612].
See #37846.

git-svn-id: https://develop.svn.wordpress.org/trunk@38613 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-15 16:55:19 +00:00
Pascal Birchler
98e386c6f9 Menus: Remove 'sub item' label when removing the sub item's parent.
Props rnoakes3rd, adamsilverstein.
Fixes #37846.

git-svn-id: https://develop.svn.wordpress.org/trunk@38612 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-15 16:09:21 +00:00
Sergey Biryukov
784d45b279 I18N: Correct context for Next/Previous strings in get_the_posts_pagination().
Props FlorianBrinkmann.
Fixes #37952.

git-svn-id: https://develop.svn.wordpress.org/trunk@38611 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-15 09:19:11 +00:00
Sergey Biryukov
a82723c64e Docs: Use a third-person singular verb for register_post_type_args filter added in [34242].
See #37770.

git-svn-id: https://develop.svn.wordpress.org/trunk@38610 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 21:57:13 +00:00
Sergey Biryukov
2f9762b668 Docs: Use a third-person singular verb for {$type}_template_hierarchy filter added in [38385].
See #14310.

git-svn-id: https://develop.svn.wordpress.org/trunk@38609 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 21:53:47 +00:00
Sergey Biryukov
8a5002d424 Docs: Use a third-person singular verb for smilies filter added in [38504].
See #35905.

git-svn-id: https://develop.svn.wordpress.org/trunk@38608 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 21:52:24 +00:00
Sergey Biryukov
ba1188f111 Docs: Use a third-person singular verb for wp_doing_ajax filter added in [38334].
See #25669.

git-svn-id: https://develop.svn.wordpress.org/trunk@38607 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 21:50:10 +00:00
Sergey Biryukov
eea5f80861 Docs: Use a third-person singular verb in the DocBlock summary for get_theme_file_uri(), get_parent_theme_file_uri(), get_theme_file_path(), and get_parent_theme_file_path(), introduced in [38578].
See #18302.

git-svn-id: https://develop.svn.wordpress.org/trunk@38606 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 21:47:31 +00:00
Sergey Biryukov
ada795380b Docs: Use a third-person singular verb for theme_file_uri, parent_theme_file_uri, theme_file_path, and parent_theme_file_path filters added in [38578].
See #18302.

git-svn-id: https://develop.svn.wordpress.org/trunk@38605 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 21:44:28 +00:00
Sergey Biryukov
94c9edd8d4 Docs: Add a @since entry for the post_password_required filter introduced in [38603].
Use a third-person singular verb for the filter description.

See #38056.

git-svn-id: https://develop.svn.wordpress.org/trunk@38604 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-14 21:36:18 +00:00
Aaron Jorbin
5d1ca8e2d0 Posts: Add filter to allow overriding post_password_required return
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
2016-09-14 21:27:16 +00:00
Helen Hou-Sandi
683f7bc4d3 Customizer: Better hover/focus state for section titles and available widgets.
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
2016-09-14 16:14:20 +00:00
Joe Hoyle
433b4fbfba REST API: Enable sanitize_callback to return WP_Error.
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
2016-09-14 15:49:37 +00:00