Commit Graph

35214 Commits

Author SHA1 Message Date
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
Sergey Biryukov 6f37c963de XML-RPC: Check the minimum number of arguments in `::wp_getUsersBlogs()` and `::blogger_getUsersBlogs()`.
Props kitchin for initial patch.
Fixes #29750.

git-svn-id: https://develop.svn.wordpress.org/trunk@38600 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 23:16:15 +00:00
Konstantin Obenland ddeab090e5 Make wpList easier to contribute to.
Uses more semantic variable names and adds function and inline documentation.

Props rommelxcastro for parallel work in #34917.
Fixes #36264.


git-svn-id: https://develop.svn.wordpress.org/trunk@38599 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 22:23:30 +00:00
Sergey Biryukov 4a2540a50e Media: Adjust `test_video_shortcode_body()` after [38597].
See #38040.

git-svn-id: https://develop.svn.wordpress.org/trunk@38598 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 14:08:24 +00:00
Sergey Biryukov ca8f1c024a Media: Remove an extra space in `style` attribute in `wp_video_shortcode()` after [30082].
Props danielpietrasik.
Fixes #38040.

git-svn-id: https://develop.svn.wordpress.org/trunk@38597 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 13:44:33 +00:00
Sergey Biryukov 8533eae95a Docs: Synchronize docblocks for `WP_Site_Query::__construct()` and `get_sites()` after the changes in [37735], [38008], [38103], and [38336].
Props MaximeCulea.
Fixes #38039.

git-svn-id: https://develop.svn.wordpress.org/trunk@38596 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 13:19:57 +00:00
Sergey Biryukov 90a332c3f2 Docs: Correct description for `domain` and `path` arguments in `WP_Network_Query::__construct()`.
See #32504.

git-svn-id: https://develop.svn.wordpress.org/trunk@38595 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 13:09:52 +00:00
Gary Pendergast 2950eb8ea2 Formatting: Update `autop()` to match `wpautop()`.
[38592] changed the behaviour of `wpautop()` , so it's nice to change `autop()` to match.

Interestingly, this change isn't necessary for the functionality to work - #4857 didn't affect content that had been run through `autop()` at some point, as `autop()` would add a single line break before block elements, then `wpautop()` would later add a second line break, making it work correctly.

Props nacin for finding out about [38592] on Twitter, and DMing me to remind me to review `autop()`.
See #4857.



git-svn-id: https://develop.svn.wordpress.org/trunk@38594 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 06:02:23 +00:00
Gary Pendergast 52c566f5dc Docs: Fix an outdated comment.
[38592] changed the functionality of `wpautop()`, but didn't update the associated comment to match.

Fixes #4857.



git-svn-id: https://develop.svn.wordpress.org/trunk@38593 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-13 04:00:31 +00:00
Gary Pendergast 61a95da031 Formatting: Add an extra line break before block elements in `wpautop()`.
`wpautop()` considers double line breaks to be the separator between block level HTML elements. By adding two line breaks before a block element, this allows us to process the text before a block element correctly.

Fixes #4857.



git-svn-id: https://develop.svn.wordpress.org/trunk@38592 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-12 07:05:28 +00:00
Gary Pendergast 7511fe88cc Database: Normalise index names in `dbDelta()`.
When comparing index definitions, normalise the index names to lower case, as they are not case sensitive within MySQL.

Fixes #34874.



git-svn-id: https://develop.svn.wordpress.org/trunk@38591 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-12 05:08:17 +00:00
Gary Pendergast f54b5428c4 Database: Increase the size of `wp_posts.post_password` to 255 characters.
Longer passwords and passphrases are much more common than when post passwords were introduced all those eons ago, so let's increase the length of the `post_password` field from 20 to 255 characters.

The password will continue to be stored in plaintext, as the ability for the post author to view the password is a commonly used feature.

Trivia: this was the last 3 digit Trac ticket to be closed.

Props skippy, nazgul, iandunn, adamsilverstein, pento.
Fixes #881.



git-svn-id: https://develop.svn.wordpress.org/trunk@38590 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-12 02:27:55 +00:00
Gary Pendergast 0998de889d Bootstrap: Use `dirname()` when loading `class-wp-hook.php` from `plugin.php`.
To allow `plugin.php` to be loaded before the rest of WordPress is loaded, it cannot rely on WordPress constants, such as `ABSPATH` and `WPINC`.

Instead, we can assume that `class-wp-hook.php` will be in the same directory as `plugin.php`, so `dirname( __FILE__ )` will give us the correct path to load from.

Props pento, dd32.
Fixes #37707.



git-svn-id: https://develop.svn.wordpress.org/trunk@38589 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-12 01:49:46 +00:00
Weston Ruter d21f8b8869 Docs: Fix phpdoc and jsdoc typos introduced in [38584] and [38587], respectively.
See #33742.
See #20714.


git-svn-id: https://develop.svn.wordpress.org/trunk@38588 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-11 18:45:59 +00:00
Weston Ruter 44dbc815c8 Customize: Implement previewing of form submissions which use the GET method.
This finally allows the search results template to navigated to in the customizer preview.

Fixes #20714.


git-svn-id: https://develop.svn.wordpress.org/trunk@38587 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-11 05:04:39 +00:00
Boone Gorges 37e983416b Query: Eliminate unnecessary `wp_list_filter()` call in `get_queried_object()`.
The refactor in [30711] swapped out the old `queries` property for the
new `queried_terms`, but should also have gotten rid of the now-
superfluous `wp_list_filter()` call.

Fixes #37962.

git-svn-id: https://develop.svn.wordpress.org/trunk@38586 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-09 19:48:26 +00:00
Boone Gorges 6adcd15435 Query: Avoid PHP notice in `get_queried_object()` when query contains `NOT EXISTS` tax query.
Props johnjamesjacoby.
See #37962.

git-svn-id: https://develop.svn.wordpress.org/trunk@38585 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-09 19:36:22 +00:00
Weston Ruter 6c8c98fe5b Menus: Prevent non-published posts/pages from being returned in search results for adding as nav menu items.
Re-use the same query vars in searching as when listing posts. Aligns with behavior of nav menus in customizer.

Fixes #33742.
Props welcher, westonruter.


git-svn-id: https://develop.svn.wordpress.org/trunk@38584 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-09 04:59:01 +00:00