These (and a few others that can be revisited later if needed) were present in
beta versions of the WP REST API but were removed during the merge to WP 4.7.
Props ChopinBach, jnylen0.
Fixes#38693.
git-svn-id: https://develop.svn.wordpress.org/trunk@40605 602fd350-edb4-49c9-b593-d223f7449a82
Now that the `WordPress/wordpress-develop` GitHub repo is syncing correctly, we can use it for Travis integration.
Props jorbin for getting the ball rolling so long ago, unprops jorbin because his Travis build can finally be retired.
Fixes#40712.
git-svn-id: https://develop.svn.wordpress.org/trunk@40604 602fd350-edb4-49c9-b593-d223f7449a82
In 4.7, the REST API introduced types for options and meta passed into the registration functions. This adds the documentation for those types.
Props iandunn, priyankabehera155.
Fixes#40318.
git-svn-id: https://develop.svn.wordpress.org/trunk@40603 602fd350-edb4-49c9-b593-d223f7449a82
For compatibility with filters on hooks on content filters (such as shortcodes), we need to set the global. This mirrors the Posts controller.
Props pdufour, jnylen0.
Fixes#40626.
git-svn-id: https://develop.svn.wordpress.org/trunk@40601 602fd350-edb4-49c9-b593-d223f7449a82
Browsers send an "Origin: null" header value for file and data URLs, as they can be generated by any document, and their origin is not guaranteed. Since we want to allow any URL to access the API (intentionally disabling the CORS protections), we need to special-case the non-URL "null" value.
Props joehoyle.
Fixes#40011.
git-svn-id: https://develop.svn.wordpress.org/trunk@40600 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
[40591] and [40593] introduced a `$network_id` parameter for `wp_maybe_update_network_site_counts()` and `wp_maybe_update_network_user_counts()`, as well as [40486] previously added it to `wp_update_network_counts()`. This changeset ensures the filter hooks in `ms-default-filters.php` do not pass any parameter to them that might conflict with their actual `$network_id` parameter, which caused unit test failures before.
Fixes#40703.
git-svn-id: https://develop.svn.wordpress.org/trunk@40596 602fd350-edb4-49c9-b593-d223f7449a82
If an email address is missing an `@`, we can't assume enough to check it against a list of domain names.
Additional validation of email should happen in `is_email()` before being passed to `is_email_address_unsafe()`.
Fixes#39915.
git-svn-id: https://develop.svn.wordpress.org/trunk@40595 602fd350-edb4-49c9-b593-d223f7449a82
Previously, an invalid email could result in an undefined index when attempting to determine the email domain.
Props ocean90.
See #39915.
git-svn-id: https://develop.svn.wordpress.org/trunk@40594 602fd350-edb4-49c9-b593-d223f7449a82
This allows calling the function for a specific network correctly, for example after a user has been created for it or been removed from it.
Fixes#40385. See #38699.
git-svn-id: https://develop.svn.wordpress.org/trunk@40593 602fd350-edb4-49c9-b593-d223f7449a82
This allows calling the function for a specific network correctly, for example after a site has been created for it or been removed from it.
Fixes#40384. See #38699.
git-svn-id: https://develop.svn.wordpress.org/trunk@40591 602fd350-edb4-49c9-b593-d223f7449a82
Now that `get_blog_count()` and `get_user_count()` both support passing a `$network_id` parameter (see [40370] and [40371]), similar functionality is now available for `wp_is_large_network()`. In addition, the filter `wp_is_large_network` now accepts the network ID as its fourth parameter.
This changeset furthermore introduces unit tests for the `wp_is_large_network()` function and its filter.
Fixes#40489.
git-svn-id: https://develop.svn.wordpress.org/trunk@40590 602fd350-edb4-49c9-b593-d223f7449a82
Prior to this change, the minimum site name length checked in `wpmu_validate_blog_signup()` was set to a fixed value of 4. The new filter allows tweaking this value, as there may be cases where shorter site names may be required.
Fixes#39676.
git-svn-id: https://develop.svn.wordpress.org/trunk@40589 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the UN flag test relied on the image being produced to be quite small. Unfortunately, the Chrome PNG encoder seems to have changed recently, and it now produces a relatively large image.
For a better test, we can compare the rendering of [U] + [N] against [U] + zero width space + [N].
Fixes#40616.
git-svn-id: https://develop.svn.wordpress.org/trunk@40582 602fd350-edb4-49c9-b593-d223f7449a82
This prevents lingering cookies when logging out and when switching between user accounts.
Props soulseekah, shanee
Fixes#32567
git-svn-id: https://develop.svn.wordpress.org/trunk@40580 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
When headers are stored in WP_REST_Request internally they are canonicalized. This step already happens on setting / getting headers in any way, but was missed when implementing remove_header().
Props TimothyBlynJacobs.
Fixes#40347.
git-svn-id: https://develop.svn.wordpress.org/trunk@40577 602fd350-edb4-49c9-b593-d223f7449a82
Adds `pixels` as unit, avoiding abbreviation for a clearer pronunciation by screen
readers. Also, adds the word `by` instead of the special character `times`.
Props Presskopp, stormrockwell.
Fixes#38932.
git-svn-id: https://develop.svn.wordpress.org/trunk@40573 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
This complements the `nav_menu_link_attributes` filter used in `Walker_Nav_Menu::start_el()`.
Props pbiron.
Fixes#40359.
git-svn-id: https://develop.svn.wordpress.org/trunk@40565 602fd350-edb4-49c9-b593-d223f7449a82
This removes the need to manually call `$this->skipWithMultisite()` and `$this->skipWithoutMultisite()` from within the test when the test only runs without Multisite or only runs on Multisite, respectively.
Props jdgrimes for the suggestion.
Fixes#40531
git-svn-id: https://develop.svn.wordpress.org/trunk@40564 602fd350-edb4-49c9-b593-d223f7449a82
This has a slight performance impact on sites with a large number of users when the `time` strategy is used for counting users. Hopefully this impact will be negated by enhancements proposed in #38741.
Props psoluch, dots, boonebgorges, ptbello, tharsheblows
Fixes#29785
git-svn-id: https://develop.svn.wordpress.org/trunk@40560 602fd350-edb4-49c9-b593-d223f7449a82