Commit Graph

31985 Commits

Author SHA1 Message Date
Sergey Biryukov 1fc41894d2 Customizer: Replace context for two strings added in [30306] with a translator comment.
Fixes #34203.

git-svn-id: https://develop.svn.wordpress.org/trunk@34921 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 23:53:35 +00:00
John Blackbourn 4046919a11 Avoid stripping square brackets from URLs, and instead correctly encode them. Square brackets must be encoded in the path, path parameters, query parameters, and fragment, but must not be encoded in anything up to the domain and port.
Adds tests.

Fixes #16859


git-svn-id: https://develop.svn.wordpress.org/trunk@34920 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 23:38:22 +00:00
Boone Gorges f9f92b223d Handle `WP_User` objects properly in `update_user_caches()`.
We should not be storing the `WP_User` object in the cache, as it may contain
usermeta and other data that's cache elsewhere.

Props dd32.
See #24635.

git-svn-id: https://develop.svn.wordpress.org/trunk@34919 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 22:41:07 +00:00
Boone Gorges e1d7108e79 Add tests for `update_user_caches()`.
See #24635.

git-svn-id: https://develop.svn.wordpress.org/trunk@34918 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 22:34:32 +00:00
John Blackbourn ee251924b3 Pass the `$post` parameter to the `_wp_post_revision_fields` filter. This provides more context to the filter, which allows for different fields to be displayed on the revisions screen depending on the post.
The `_wp_post_revision_fields()` function now also accepts a `WP_Post` object (in addition to an array of post fields) to facilitate this change.

Fixes #13382
Props adamsilverstein


git-svn-id: https://develop.svn.wordpress.org/trunk@34917 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 21:52:18 +00:00
John Blackbourn e40575aa99 Correctly set the scheme of the `home` and `siteurl` options when creating a new site on multisite that uses some combination of HTTPS in the admin area or on the front end.
Fixes #33620
Props tryon, johnbillion


git-svn-id: https://develop.svn.wordpress.org/trunk@34916 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 21:45:17 +00:00
John Blackbourn 6705184dcc Correctly encode the `url` parameter that gets passed to WordPress' own oEmbed endpoint URL.
Fixes #34193
Props ocean90


git-svn-id: https://develop.svn.wordpress.org/trunk@34915 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 21:42:36 +00:00
John Blackbourn b877e3c692 Add an optional `$description` parameter to `status_header()` so custom HTTP status descriptions can be provided.
Fixes #21472
Props nbachiyski, iamfriendly


git-svn-id: https://develop.svn.wordpress.org/trunk@34914 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 21:25:54 +00:00
Andrea Fercia 8483316de5 Bump H3 headings to H2 on the Network Admin > Sites > Edit Site screens.
The navigation tabs appear in an `<h3>` heading immediately following the main `<h1>` and need to have a proper hierarchy.
Also, fix the tabs focus style and introduce a new `.nav-tab-small` CSS class.

Fixes #34079.

git-svn-id: https://develop.svn.wordpress.org/trunk@34913 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 17:34:56 +00:00
Jeremy Felt 599fb50e09 Revert [34778], continue using `_site_option()` for the current network.
The `_network_option()` parameter order will be changing to accept `$network_id` first. The `_site_option()` functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34912 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 17:11:01 +00:00
Drew Jaynes 9a704fa0b8 Docs: Improve documentation for `post_submit_meta_box()`, which serves as the display callback for the 'Publish' meta box.
* `$post` is now correctly defined as being of the `WP_Post` type
* Adds a hash notation for the `$args` array
* Other minor fixes.

Props drebbitsweb.
Fixes #34171.


git-svn-id: https://develop.svn.wordpress.org/trunk@34911 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 16:33:52 +00:00
John Blackbourn 61280672d2 Prevent a PHP notice when POSTing to `wp-login.php?action=register` without a `user_login` or `user_email` field in the POST request.
Fixes #34192


git-svn-id: https://develop.svn.wordpress.org/trunk@34910 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 14:42:39 +00:00
John Blackbourn c4dd769f22 Prevent a PHP notice from appearing on `wp-login.php?action=postpass` when there's no `$_POST['post_password']` parameter. Redirects to the referer if there is one (if there isn't one it'll just exit with a blank screen; no need for a user-friendly error message here).
Fixes #34160
Props iamfriendly


git-svn-id: https://develop.svn.wordpress.org/trunk@34909 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 14:29:29 +00:00
Dominik Schilling (ocean90) 7f292f7ba4 Embeds: Autoprefixer for [34903].
See #32522.

git-svn-id: https://develop.svn.wordpress.org/trunk@34908 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 14:06:36 +00:00
John Blackbourn 13e8899262 Update the explanatory text which accompanies the list of whitelisted oEmbed providers, following the change to the default value of the `discover` argument in `WP_oEmbed::get_provider()`.
See #32522


git-svn-id: https://develop.svn.wordpress.org/trunk@34907 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 13:04:32 +00:00
Gary Pendergast 46fbcc96fd Build: Fix a filename typo in [34903].
Props peterwilsoncc.

See #32522.



git-svn-id: https://develop.svn.wordpress.org/trunk@34906 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 12:04:39 +00:00
Gary Pendergast 7c508ff9fa Tests: Exclude the `oembed/headers.php` test file, which was marked as PHP >= 5.3.0 in [34904].
See #32522.



git-svn-id: https://develop.svn.wordpress.org/trunk@34905 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 12:00:34 +00:00
Gary Pendergast a170c1f67e Embeds: After [34903], remove an accidentally included text domain, and exclude a test failing in PHP 5.2.
git-svn-id: https://develop.svn.wordpress.org/trunk@34904 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 11:00:59 +00:00
Gary Pendergast 43bd3d46c9 Embeds: Add oEmbed provider support.
For the past 6 years, WordPress has operated as an oEmbed consumer, allowing users to easily embed content from other sites. By adding oEmbed provider support, this allows any oEmbed consumer to embed posts from WordPress sites.

In addition to creating an oEmbed provider, WordPress' oEmbed consumer code has been enhanced to work with any site that provides oEmbed data (as long as it matches some strict security rules), and provides a preview from within the post editor.

For security, embeds appear within a sandboxed iframe - the iframe content is a template that can be styled or replaced entirely by the theme on the provider site.

Props swissspidy, pento, melchoyce, netweb, pfefferle, johnbillion, extendwings, davidbinda, danielbachhuber, SergeyBiryukov, afercia

Fixes #32522.



git-svn-id: https://develop.svn.wordpress.org/trunk@34903 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 10:35:18 +00:00
Jeremy Felt cce73768b3 Tests: Remove static capture of space used and space allowed.
Originally introduced in [34601], this was necessary to avoid test pollution. Now that things have been separated and written to play nicely, we can remove this.

See #34037.


git-svn-id: https://develop.svn.wordpress.org/trunk@34902 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 07:24:47 +00:00
Jeremy Felt dadd89575f Tests: Improve tests for `upload_is_user_over_quota()`.
* Move all tests to a new 'multisite/uploadIsUserOverQuota.php'
* Use `get_space_allowed` and `pre_get_space_used` filters to help avoid test pollution.

See #34037.


git-svn-id: https://develop.svn.wordpress.org/trunk@34901 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 07:20:45 +00:00
Jeremy Felt b41be4c55c Tests: Account for non-numeric strings in tests for `get_space_allowed()`.
Provides a specific test for a case where a non-numeric strings are assigned to `blog_upload_space` at both the site and network levels.

See #34037.


git-svn-id: https://develop.svn.wordpress.org/trunk@34900 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 06:16:58 +00:00
Jeremy Felt b947cad868 Tests: Improve tests for `is_upload_space_available()`.
* Move all tests to a new 'multisite/isUploadSpaceAvailable.php'
* Store original `blog_upload_space` values before the class is loaded.
* Restore these values after each test tear down to avoid pollution.

Commit to testing `is_upload_space_available()` itself by always filtering the amount of space used through `pre_get_space_used`. This allows us to sanely test without worrying about the local environment. In the future, we may be able to remove some of these tests as `get_upload_space_available()` tests are built out and reliable.

See #34037.


git-svn-id: https://develop.svn.wordpress.org/trunk@34899 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 06:14:14 +00:00
Jeremy Felt 8cf73c132d Tests: Improve tests for `get_space_allowed()`.
* Move all tests to a new `multisite/getSpaceAllowed.php`
* Store original `blog_upload_space` values before the class is loaded.
* Restore these values after each test tear down to avoid pollution.
* Add a comprehensive set of expectations and results via data provider.

See #34037.


git-svn-id: https://develop.svn.wordpress.org/trunk@34898 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 04:57:12 +00:00
Scott Taylor 02251dcd5d List Tables: in `_WP_List_Table_Compat::get_column_info()`, also return `$primary`, which is expected since [33016].
Props tyxla.
Fixes #34148.


git-svn-id: https://develop.svn.wordpress.org/trunk@34897 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 03:11:52 +00:00
Boone Gorges 7cfee3c41d Move `wp_installing()` to load.php.
Various functions in load.php need to check whether WP is in installation mode.
Let's let them.

Props adamsilverstein.
See #31130.

git-svn-id: https://develop.svn.wordpress.org/trunk@34896 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 03:01:27 +00:00
Scott Taylor 7665377058 Meta Boxes: add an action, `post_submitbox_minor_actions`. `post_submitbox_misc_actions` already exists. Pass `$post` to both for context - avoids having to check for a global post.
Props jonathanbardo, chriscct7, DrewAPicture.
Fixes #26267.


git-svn-id: https://develop.svn.wordpress.org/trunk@34895 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 02:44:59 +00:00
Scott Taylor aac08d7735 Introduce `wp_get_server_protocol()` to DRY protocol parsing logic and make adding more protocols, like `HTTP/2`, easier.
Props johnbillion, wonderboymusic.
Fixes #34131.


git-svn-id: https://develop.svn.wordpress.org/trunk@34894 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 02:34:58 +00:00
Scott Taylor dae3ea83cb Meta Boxes: reboot some of the code in `postbox.js` to support `aria-expanded` attribute toggling and to properly reference static class properties.
Props afercia, wonderboymusic.
Fixes #33754.


git-svn-id: https://develop.svn.wordpress.org/trunk@34893 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:57:06 +00:00
Scott Taylor b7c01dc018 List Tables: after [34276], decrease horizontal padding for sorted column headers (causing weirdness in the Count column of tax list tables) - the vertical padding change suffices in fixing the original issue.
Fixes #27945.


git-svn-id: https://develop.svn.wordpress.org/trunk@34892 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:39:27 +00:00
Scott Taylor 9e267b6e72 List Tables/WP_Screen: in `WP_Screen`, add methods to store, retrieve, and render screen reader text, primarily used by list table screens.
These additions are based on an audit and recommendations by the Accessibility team. #a11y'all

Props afercia.
Fixes #32147.


git-svn-id: https://develop.svn.wordpress.org/trunk@34891 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:27:01 +00:00
Scott Taylor 84df5f067c Rewrite/Permalinks/Canonical: in `url_to_postid()`, call `set_url_scheme()` on the URL to combat mixed content issues and find posts cross-scheme.
Adds unit tests.

Props swissspidy.
Fixes #34144.


git-svn-id: https://develop.svn.wordpress.org/trunk@34890 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:06:58 +00:00
Scott Taylor 6507668f4e Posts List Table: ensure that "All" gets the "current" CSS class when applicable.
Props afercia.
Fixes #19609.


git-svn-id: https://develop.svn.wordpress.org/trunk@34889 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 00:08:42 +00:00
Scott Taylor bec5838166 Build Tools: upgrade `grunt-browserify` to `~4.0.0` and remove the `watch` task for `browserify`, which has its own internal watcher. Run `npm install` to update.
Props iseulde.
Fixes #31911.


git-svn-id: https://develop.svn.wordpress.org/trunk@34888 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 00:00:00 +00:00
Sergey Biryukov 24cc3db43a Remove closing PHP tag from `wp-includes/class-phpass.php`.
Previously: [19712], [28678].

Props iamfriendly, amandato.
Fixes #30534.

git-svn-id: https://develop.svn.wordpress.org/trunk@34887 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 23:44:20 +00:00
Drew Jaynes 36736636c1 Docs: Only document `get_posts()` argument defaults that differ from, or aren't present in the defaults offered by `WP_Query::parse_query()`.
Props johnbillion.
Fixes #34156.


git-svn-id: https://develop.svn.wordpress.org/trunk@34886 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 23:18:05 +00:00
Drew Jaynes f2188269ce Login: Pass the `$errors` object as a parameter to the `lostpassword_post` hook.
Props iamfriendly.
Fixes #32116.


git-svn-id: https://develop.svn.wordpress.org/trunk@34885 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 22:59:30 +00:00
Drew Jaynes 0d1c1381b3 Docs: `_pad_term_counts()` takes an array of objects passed by reference, not term IDs.
Props wpsmith.
Fixes #34174.


git-svn-id: https://develop.svn.wordpress.org/trunk@34884 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 22:38:47 +00:00
Weston Ruter 346ebe0993 Customizer: Ensure that `wp.customize.Widgets.savedWidgetIds` is defined up front.
In 4.3 the widget controls were fully initialized up front along with the sidebar controls. The sidebar control depended (unnecessarily) on the widget control to ensure that `wp.customize.Widgets.savedWidgetIds` was defined. So after [34563] there could be a situation where the widgets are added/removed from a sidebar before their controls are initialized (if the sidebar section is never expanded), resulting in an error attempting to get a property off of an undefined value. So this change does the right thing and defines `savedWidgetIds` up front.

Also changes the `savedWidgetIds` variable type from an array to an object, to match how it is used as a dictionary lookup.

See #33901.


git-svn-id: https://develop.svn.wordpress.org/trunk@34883 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 21:58:48 +00:00
Jeremy Felt 4bec1448f3 Registration: Remove the last remaining `Lucida Grande` from WordPress.
Defer to default styling provided by the theme (and browser) in `wp-activate.php` and remove the `font-family` and `color` from the provided internal stylesheet.

Previously, [17327] and [18406].

Fixes #34145.


git-svn-id: https://develop.svn.wordpress.org/trunk@34882 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 21:55:39 +00:00
Konstantin Obenland cb4554b3df Posts: Add post class for password protected posts.
Up until now password protected posts would only get a identifying class when
the password was still required. This adds a class for the case when that
requirement has been met.

For the other visibility types we already have `status-publish`
and `status-private`.

Props mdgl, F4rkie, wonderboymusic for initial patches.
Fixes #21899.



git-svn-id: https://develop.svn.wordpress.org/trunk@34881 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 21:53:20 +00:00
Aaron Jorbin 351beec384 Revert [34875] due to unintentional breaking change
WordPress.org was taken down due to as Otto42 describes:

The previous version of this function added the query piece for the meta key = blog_id.capabilities, regardless of whether or not a role was requested. This limits the users returned to those with some defined role on this particular multisite instance.

See #22212




git-svn-id: https://develop.svn.wordpress.org/trunk@34880 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 20:57:35 +00:00
Aaron Jorbin f17e457a16 Add message with status info to temperamental assertion.
The ajax delete comment tests are intermittently failing. Many of the assertions make it hard to tell why they are failing. This adds a message to one of those assertions that contains some info on what is being asserted with the goal that it helps developers understand why the failure is failing.

See #33968



git-svn-id: https://develop.svn.wordpress.org/trunk@34879 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 19:55:56 +00:00
Sergey Biryukov b86e47d915 Transients: Clarify the `expiration_of_site_transient_$transient` filter description.
See #21330.

git-svn-id: https://develop.svn.wordpress.org/trunk@34878 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 18:10:17 +00:00
Dominik Schilling (ocean90) 4099310ff5 Transients: Rename filters added in [34865].
* `expiration_pre_set_transient_$transient` => `expiration_of_transient_$transient`
* `expiration_pre_set_site_transient_$transient` => `expiration_of_site_transient_$transient`

Fix hook docs.

Props chriscct7.
Fixes #21330.

git-svn-id: https://develop.svn.wordpress.org/trunk@34877 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:58:19 +00:00
Drew Jaynes 843cdf1f73 Docs: Update an inline comment in `wp_get_attachment_image_sizes()`, which came in as part of the Responsive Images merge in [34855].
Props joemcgill.
See #33641.


git-svn-id: https://develop.svn.wordpress.org/trunk@34876 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:46:30 +00:00
Boone Gorges 1949734cf3 Improve role-related arguments in `WP_User_Query`.
* 'role' now accepts an array or comma-separated list of role names. When passing multiple values for 'role', `WP_User_Query` will only match users that have all of the specified roles.
* 'role__in' accepts an array of role names, and allow the filtering of matched users to those with at least one of the specified roles.
* 'role__not_in' accepts an array of role names, and allows the filtering of matched users to those who have none of the specified roles.

Props swissspidy, mordauk, barrykooij, sirbrillig.
Fixes #22212.

git-svn-id: https://develop.svn.wordpress.org/trunk@34875 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:39:23 +00:00
Aaron Jorbin 7825c097b8 Adjust detection of stream timeouts in maybe skip tests for https tests
This is a follow up to [34848].

See #33968.



git-svn-id: https://develop.svn.wordpress.org/trunk@34874 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:39:14 +00:00
Dominik Schilling (ocean90) 1e06e917af MS Themes List Table: Fix inverted logic for displaying the "No items" message.
Fixes #25464.

git-svn-id: https://develop.svn.wordpress.org/trunk@34873 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:34:54 +00:00
Sergey Biryukov f5b64d1674 Fix typo in [34848].
See #33968.

git-svn-id: https://develop.svn.wordpress.org/trunk@34872 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 17:27:12 +00:00