Commit Graph

35079 Commits

Author SHA1 Message Date
Dominik Schilling
626169a8ce Docs: Fix typo in hook description for customize_save_validation_before.
See #37318.

git-svn-id: https://develop.svn.wordpress.org/trunk@38140 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 13:50:42 +00:00
Dominik Schilling
ec783d67b9 Docs: Fix minor formatting issue for a comment added in [38113].
See #32171.

git-svn-id: https://develop.svn.wordpress.org/trunk@38139 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 13:45:33 +00:00
Dominik Schilling
92231118dd Filesystem API: Change the default value for the $context parameter of get_filesystem_method() and request_filesystem_credentials() to an empty string.
`$context` is a full path to the directory that is tested for being writable. A path shouldn't be a boolean value.
This also updates `WP_Upgrader_Skin::request_filesystem_credentials()` and `Automatic_Upgrader_Skin::request_filesystem_credentials()` and adds missing docs.

Props DrewAPicture, ocean90.
Fixes #37412.


git-svn-id: https://develop.svn.wordpress.org/trunk@38138 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 12:09:55 +00:00
Dominik Schilling
b19f91f4bb Post Thumbnails: Remove an unused nonce in _wp_post_thumbnail_html().
See #12922.



git-svn-id: https://develop.svn.wordpress.org/trunk@38137 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 11:43:36 +00:00
Dominik Schilling
4fd98bb5ed Media: Remove global import for $content_width in _wp_post_thumbnail_html().
`$content_width` is unused since [35023].

See #28512.

git-svn-id: https://develop.svn.wordpress.org/trunk@38136 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 11:39:28 +00:00
Sergey Biryukov
fad2c0111b Docs: Fix typo in wp_title() description.
Props ixkaito.
Fixes #37442.

git-svn-id: https://develop.svn.wordpress.org/trunk@38135 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 10:44:05 +00:00
Dominik Schilling
db037aad34 Docs: Change type of WP_Upgrader_Skin::$result to 'string|bool|WP_Error'.
`$result` can be `true` too, see `Language_Pack_Upgrader::bulk_upgrade()`.

See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38134 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 10:42:35 +00:00
Sergey Biryukov
e7bd22f87e Database: Replace incorrect use of E_USER_NOTICE in wpdb::_real_escape() with the version number where the message was added.
Props andizer.
Fixes #36403.

git-svn-id: https://develop.svn.wordpress.org/trunk@38133 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 22:44:26 +00:00
Sergey Biryukov
90d4614157 Editor: Improve styling of "Add Media" button on mobile and make it more consistent with media buttons added by plugins.
Props FolioVision.
Fixes #36999.

git-svn-id: https://develop.svn.wordpress.org/trunk@38132 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 21:53:09 +00:00
Sergey Biryukov
0c1b988a63 Docs: In meta box functions, clarify that "Meta box ID" refers to the id attribute of the meta box and not a numeric ID.
Fixes #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38131 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:23:56 +00:00
Sergey Biryukov
58e390d1ac Menus: In wp_nav_menu_item_taxonomy_meta_box():
* Rename the `$taxonomy` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_categories_meta_box()` and other meta box functions.

See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38130 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:20:50 +00:00
Sergey Biryukov
48f6fddb49 Menus: In wp_nav_menu_item_post_type_meta_box():
* Rename the `$post_type` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_format_meta_box()` and other meta box functions.
* Correct type and description for the third argument of `nav_menu_items_{$post_type_name}_recent` filter.

See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38129 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:18:36 +00:00
Sergey Biryukov
068ecc915c Docs: Correct and expand the docs for the $taxonomy argument of wp_nav_menu_item_taxonomy_meta_box().
Props mehulkaklotar for initial patch.
See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38128 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 18:00:41 +00:00
Sergey Biryukov
1db7b8441a Docs: Correct and expand the docs for the $post_type argument of wp_nav_menu_item_post_type_meta_box().
Props mehulkaklotar for initial patch.
See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38127 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 17:59:52 +00:00
Andrew Ozz
fb1fbcfdc0 TinyMCE, link check:
- Use `wp.a11y.speak()` to announce bad URLs.
- Do not add a title to the link toolbar.
- Better error message.

Props afercia, azaozz.
See #36638.

git-svn-id: https://develop.svn.wordpress.org/trunk@38126 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 03:41:17 +00:00
Drew Jaynes
7e52b06003 Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 2/2.

Fixes #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38125 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 19:32:05 +00:00
Dominik Schilling
22585895b3 Post WordPress 4.6 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@38124 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 18:42:54 +00:00
Dominik Schilling
fb6193a820 WordPress 4.6 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@38123 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 18:31:44 +00:00
Dominik Schilling
63b7f3da1b Script Loader: Use dns-prefetch for the Emoji CDN.
* `preconnect` will be potentially pretty heavy on the CDN. With the Unicode 9.0 emoji update, almost all browsers will trigger the `preconnect`.
* `preconnect` only opens one connection, but `s.w.org` is HTTP/1.1, so the browser will use the preconnected connection for the first emoji, then it has to open new connections for subsequent emoji.

Also use the same URL as we use for the `emoji_svg_url` filter. This will print the hint for the correct CDN in case someone uses a custom CDN.

Props peterwilsoncc.
Fixes #37387.

git-svn-id: https://develop.svn.wordpress.org/trunk@38122 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 18:18:30 +00:00
Drew Jaynes
c750ff2d3c Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 1/2.

See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38121 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:56:21 +00:00
Drew Jaynes
dd49a0512b Docs: Add missing inline documentation in WP_HTTP_Requests_Response.
* Adds a missing file header
* Adjusts class DocBlock
* Adds missing version and access information for all methods

See #37318, [37428] and #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@38120 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:33:11 +00:00
Dominik Schilling
44676ab38f Plugins: Improve Ajax search of new plugins.
Fixes a few accessibility issues, restores the "Search Results" tab and the search type selector, and improves compatibility with older browsers.

Props rahulsprajapati, swissspidy, adamsilverstein, ocean90
See #37233.

git-svn-id: https://develop.svn.wordpress.org/trunk@38119 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:31:50 +00:00
Joe McGill
2586eeeeca Post Thumbnails: Only update featured images when saving a post.
Previously, changing the post thumbnail of a published post in the edit screen
would immediately apply the change, rather than waiting for the post to be
saved before applying the update. This could lead to someone unintentionally
editing the post thumbnail on a published post, and made it impossible to
preview changes to post thumbnails on published posts before saving the change.

This introduces a new Ajax handler, `wp_ajax_get_post_thumbnail_html()` to
retrieve the HTML for the post thumbnail meta box without updating the post
meta value for `_thumbnail_id`. It also allows post thumbnail changes to be
previewed by passing the `_thumbnail_id` as a query variable to the preview
screen and adding a new filter, `_wp_preview_post_thumbnail_filter()`, which
gets applied to `get_post_metadata` during the post preview process.

Props flixos90.
Fixes #12922.

git-svn-id: https://develop.svn.wordpress.org/trunk@38118 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:23:36 +00:00
Sergey Biryukov
f5f8d1df2b Comments: Introduce the cache_domain argument for WP_Comment_Query to allow caching to a unique set of cache buckets.
See [18128] for `get_terms()` and [37572] for `WP_Term_Query`.

Props Chouby, rachelbaker.
Fixes #37419.

git-svn-id: https://develop.svn.wordpress.org/trunk@38117 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 15:06:19 +00:00
Joe McGill
1bda0a6e2e Media: Ensure empty alt attributes are set to blank strings.
This is a follow up to [38065] to ensure that `wp.html.string()` always
converts empty `alt` attributes to `alt=""` rather than returning HTML using
empty attribute notation, like `alt`. This allows screen readers to ignore
images with empty `alt` attributes, rather than reading out the URL string.

Additionally this completely removes the logic in `wp.html.string()` for
converting blank attributes to empty attribute notation since empty attribute
notation is generally meant to denote a boolean value, e.g.,
`checked` == `checked="checked"`, which doesn't apply in this context because
boolean attributes must be omitted in order to represent a `false` value.
See: https://www.w3.org/TR/html5/infrastructure.html#boolean-attributes

Props adamsilverstein, afineman, joemcgill.
Fixes #36735.

git-svn-id: https://develop.svn.wordpress.org/trunk@38116 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 14:37:24 +00:00
Andrea Fercia
e284dafbc7 Accessibility: Ensure only text is sent to aria-live messages.
While messages passed to `wp.speak.a11y()` should preferably be meaningful,
short, and carefully crafted case by case, this will ensure any HTML tags will
be stripped out from the message string.

Props adamsilverstein.
Fixes #37382.

git-svn-id: https://develop.svn.wordpress.org/trunk@38115 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 14:25:34 +00:00
Rachel Baker
2cda326902 Tests: Include the check_comment function tests in the comment group.
Adds `@group comment` notation to the `Tests_Comment_CheckComment` class. Introduced in [32519].

Props gma992.
Fixes #37356.

git-svn-id: https://develop.svn.wordpress.org/trunk@38114 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 14:06:44 +00:00
Mike Schroder
ffb2db0521 Media: Clean up prior image edits if IMAGE_EDIT_OVERWRITE is true.
When `IMAGE_EDIT_OVERWRITE` is set to true, edited image files are
supposed to be deleted when an image is restored to the original.

However, when an image was edited more than once, and then restored,
files created during previous edits were left behind.

Fixes this behavior by updating `wp_save_image()` to clean up
leftover images after each edit when `IMAGE_EDIT_OVERWRITE` is true.

Props bradt, chriscct7, joemcgill.
Fixes #32171.

git-svn-id: https://develop.svn.wordpress.org/trunk@38113 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 07:34:54 +00:00
Drew Jaynes
3dc7308bea Docs: Add missing class, method, and property DocBlocks for feed classes.
Covers:

* `WP_Feed_Cache`
* `WP_Feed_Cache_Transient`
* `WP_SimplePie_File`
* `WP_SimplePie_Sanitize_KSES`

Props ramiy, stevenkword.
Fixes #36295.


git-svn-id: https://develop.svn.wordpress.org/trunk@38112 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 07:32:26 +00:00
Gary Pendergast
62c518df0d Tools: Update grunt-patch-wordpress to 0.4.2.
This update fixes invalid patches being uploaded to Trac when the `diff-cmd` is set to `colordiff`.

Props jorbin.
Fixes #37410.



git-svn-id: https://develop.svn.wordpress.org/trunk@38111 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 06:48:26 +00:00
Andrew Ozz
616d4416e2 TinyMCE: replace the editor iframe title on MacOS to fix the help shortcut.
Props afercia, azaozz.
Fixes #36863.

git-svn-id: https://develop.svn.wordpress.org/trunk@38110 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 01:38:12 +00:00
Sergey Biryukov
79e7fca981 Permalinks: In wp_install_maybe_enable_pretty_permalinks():
* Use `get_page_by_path()` instead of a hardcoded ID, which may not always exist.
* Remove the "test against a random 404 page" part, which is no longer relevant after [34442].

Fixes #36628.

git-svn-id: https://develop.svn.wordpress.org/trunk@38109 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 23:11:25 +00:00
Jeremy Felt
2a8fd61b0c Meta: Ensure $wp_meta_keys is an array in get_registered_meta_keys().
Props vishalkakadiya.
Fixes #37415, See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@38108 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 21:58:15 +00:00
Drew Jaynes
3aad67fd48 Docs: Use the three-digit, x.x.x-style version in the DocBlock for the nested lowercase_octets() function.
See #32246. See #meta942.


git-svn-id: https://develop.svn.wordpress.org/trunk@38107 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 19:33:31 +00:00
Drew Jaynes
5a286f7a1b Docs: Add a missing DocBlock for the lowercase_octets() function, which is nested within redirect_canonical().
Will be skipped from parsing.

See #32246. See #meta942.


git-svn-id: https://develop.svn.wordpress.org/trunk@38106 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 19:31:31 +00:00
Drew Jaynes
aa86283408 Readme: Link to the Plugin Developer Handbook on DevHub as the primary resource for information on extending WordPress.
The `Plugin API` article in the Codex is no longer actively maintained.

Props morganestes.
Fixes #37399.


git-svn-id: https://develop.svn.wordpress.org/trunk@38105 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 17:34:00 +00:00
Sergey Biryukov
0fbc96e5bc Docs: Clarify the fields argument description in WP_Network_Query::__construct().
See #32504.

git-svn-id: https://develop.svn.wordpress.org/trunk@38104 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 13:17:51 +00:00
Sergey Biryukov
a64a8ea726 Docs: Clarify the fields argument description in WP_Site_Query::__construct().
Props ramiy.
See #35791.

git-svn-id: https://develop.svn.wordpress.org/trunk@38103 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 13:14:40 +00:00
Sergey Biryukov
87376166f2 Multisite: Correct default value for orderby in WP_Network_Query::__construct().
Add a unit test.

See #32504.

git-svn-id: https://develop.svn.wordpress.org/trunk@38102 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 13:09:39 +00:00
Dominik Schilling
b9606d3c4a Filesystem API: Ensure memory limit calculations by PclZip are using integers.
This prevents a warning in PHP trunk, see https://wiki.php.net/rfc/invalid_strings_in_arithmetic.

See #36435.

git-svn-id: https://develop.svn.wordpress.org/trunk@38101 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 11:54:09 +00:00
Peter Wilson
b92c1c58b3 Script Loader: Limit resource hinting to enqueued assets.
Externally hosted script and style dependencies trigger `dns-prefetch` hinting only when enqueued. This removed a bug in which hinting was added on registration.

Renames the function `wp_resource_hints_scripts_styles` to `wp_dependencies_unique_hosts` as the function provides the hosts, not the hinting.

Props swissspidy.
Fixes #37385.


git-svn-id: https://develop.svn.wordpress.org/trunk@38100 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 02:34:42 +00:00
Boone Gorges
103da159d5 Taxonomy: Improve back compat of values passed to 'terms_clauses' filter.
Prior to the introduction of `WP_Term_Query`, the 'orderby' clause
passed to the 'terms_clauses' filter was prefixed by `ORDER BY`. After
`WP_Term_Query`, this was not the case; `ORDER BY` was added after the
filter. As such, plugins filtering 'terms_clauses' and returning an
'orderby' clause beginning with `ORDER BY` resulted in invalid syntax
when `WP_Term_Query` prepended a second `ORDER BY` keyword to
the clause.

This changeset rearranges the way the 'orderby' clause is built so that
it will be passed to 'terms_clauses' in the previous format.

Fixes #37378.

git-svn-id: https://develop.svn.wordpress.org/trunk@38099 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 02:12:48 +00:00
Rachel Baker
456d5b4880 Docs: Correct comment_max_links_url filter and $url param descriptions to communicate values are found links.
`$num_links` is the number of link matches found within the comment_content, and that is the value that can be modified with the `comment_max_links_url` filter.

Props pbearne.
Fixes #37319.

git-svn-id: https://develop.svn.wordpress.org/trunk@38098 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 01:48:23 +00:00
Weston Ruter
1aa4b6f87f Docs: Correct type of WP_Post_Type::$cap from array to object.
Fixes typo introduced in r37890. The `WP_Post_Type::$cap` property is set to the return value of `get_post_type_capabilities()` which is an `object`.

See #36217.


git-svn-id: https://develop.svn.wordpress.org/trunk@38097 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 22:51:39 +00:00
John Blackbourn
4a39dde8f5 Role/Capability: Introduce capability tests for non-logged-in users.
Fixes #37405


git-svn-id: https://develop.svn.wordpress.org/trunk@38096 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 22:38:18 +00:00
Jeremy Felt
4f2008a104 Meta: Remove object subtype handling from register_meta().
Registration is now based solely on object type, which allows the code around this to be simplified significantly.

In the process of making this adjustment:

* `register_meta()`, `unregister_meta_key()`, `get_registered_metadata()`, and `registered_meta_key_exists()` no longer return `WP_Error` objects.
* The recently introduced `wp_object_type_exists()` function and the restriction on object type has been removed.

Note: No guarantee of uniqueness is made across object subtypes. Registered meta keys should be uniquely prefixed to avoid conflict.

Fixes #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@38095 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 21:15:37 +00:00
Dominik Schilling
ff6d8819e4 Filesystem API: Cleanup temporary file when the temporary file couldn't be opened.
Props ruud@joyo.
See #34772.
Fixes #36942, #36943.

git-svn-id: https://develop.svn.wordpress.org/trunk@38094 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 19:42:48 +00:00
Tammie
b55afe7f4d Remove .pot files from Default Themes
Fixes #34884
Props davidakennedy


git-svn-id: https://develop.svn.wordpress.org/trunk@38093 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 14:32:52 +00:00
Dominik Schilling
cbbba23530 Comments: Use wp_strip_all_tags() to strip HTML tags.
`wp_kses()` should only be used if you have a whitelist.

Props rachelbaker.
Fixes #37208.

git-svn-id: https://develop.svn.wordpress.org/trunk@38092 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 14:03:04 +00:00
Dominik Schilling
5b6ab5a596 Plugins: Use the correct admin screen when searching for plugins via Ajax.
Both list tables provide different actions based on where they are loaded, regular admin or network admin. Since there is only one Ajax handler for both screens we have to set the current screen before using the list tables.

Props swissspidy, ocean90.
Fixes #37373.

git-svn-id: https://develop.svn.wordpress.org/trunk@38091 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 13:59:17 +00:00