Commit Graph

29149 Commits

Author SHA1 Message Date
Scott Taylor 97ad987b7c [31684] has BC issues, revert it.
Props nacin.
See #30799.



git-svn-id: https://develop.svn.wordpress.org/trunk@31685 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 02:35:36 +00:00
Scott Taylor 417aa9b84d Remove the PHP4 constructor from `WP_Widget`.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31684 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 02:24:43 +00:00
Scott Taylor 8ba3c105a0 `self` should be used for accessing local static members.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31683 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 02:21:04 +00:00
Scott Taylor 253f0dd6cf Declare `multisite` as a field for `WP_Object_Cache`.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31682 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 02:17:30 +00:00
Scott Taylor 3c810c5872 There are a few functions that have the ability to return `false` instead of a string, so the return value should be checked before being passed to functions that expect string.
These are trivial, but they clear out some Scrutinizer issues.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31681 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 02:10:36 +00:00
Andrew Ozz 7103ef6018 PressThis: fix styling of wpLink.
Props Michael-Arestad, see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31680 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 23:22:36 +00:00
Scott Taylor 1997429498 Empty `return` statements are unnecessary at the end of functions.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31679 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 23:08:48 +00:00
Scott Taylor edf982fcd5 Avoid function calls on each iteration of a `for` loop.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31678 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 23:00:21 +00:00
Boone Gorges 5b0e3180b4 jshint fixes for press-this.js.
git-svn-id: https://develop.svn.wordpress.org/trunk@31677 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 16:26:33 +00:00
Boone Gorges 969c850149 Share fixtures across `wp_list_authors()` tests.
See #30017.

git-svn-id: https://develop.svn.wordpress.org/trunk@31676 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 15:57:02 +00:00
Andrew Ozz a88e5fcadb Fix tagBox init on the Edit Post screen. Props tyxla. Fixes #31558.
git-svn-id: https://develop.svn.wordpress.org/trunk@31675 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 04:53:35 +00:00
Jeremy Felt 63ffcc96f3 Reveal row actions on focus in the network users list table.
In the future, we'll re-factor this selector pile in a way that makes things cleaner. See #25408.

Props afercia.

Fixes #31003.


git-svn-id: https://develop.svn.wordpress.org/trunk@31674 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 02:26:48 +00:00
Jeremy Felt 86b5558fd6 Introduce delete_site meta capability.
Map `delete_site` as a meta capability to `manage_options` so that the ability to delete sites can be more granularly managed for individual site administrators on a multisite network.

Props thomaswm.

Fixes #30470.


git-svn-id: https://develop.svn.wordpress.org/trunk@31673 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-08 02:09:25 +00:00
Scott Taylor f06485a701 Use `$this->` instead of `parent::` when calling `tablenav()` in `WP_Theme_Install_List_Table`.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31672 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 23:03:00 +00:00
Scott Taylor f4dc74745c Add oEmbed support for Kickstarter.
See #29126.


git-svn-id: https://develop.svn.wordpress.org/trunk@31671 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 22:10:42 +00:00
Boone Gorges 5bb3e71cc0 Whitelist 'psd' for uploads when testing `wp_attachment_is() on multisite.
It's not allowed by default, which causes the fixture not to be built.

See #25275 [31647].

git-svn-id: https://develop.svn.wordpress.org/trunk@31670 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 18:47:04 +00:00
Boone Gorges a11372afe1 Improved 'orderby' meta syntax in `WP_User_Query`.
Recent commits have added the ability to order query results by specific
clauses of the 'meta_query' parameter (comments [31467], posts [31312] and
[31340]). The current changeset ports the same functionality to `WP_User_Query`.

Also introduced is the ability to pass the value of `$meta_key` to 'orderby'.

The internals of `WP_User_Query::prepare_users()` had to be reordered
somewhat to support these changes, primarily to ensure that the `meta_query`
object generates its SQL clauses before the 'orderby' parameter is parsed.

See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31669 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 18:37:05 +00:00
Boone Gorges 6a4839bd83 User query `meta_vars` test must account for the 'blog_id' clause added in multisite.
See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31668 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 17:33:48 +00:00
Andrew Ozz 6bb478d3fd TinyMCE wpView: improve unbinding of mutationObserver in nested iframes. Props iseulde. See #31412.
git-svn-id: https://develop.svn.wordpress.org/trunk@31667 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 16:52:54 +00:00
Boone Gorges 0fb3e2566f Add tests for the conversion of 'meta_*' query vars to `$meta_query` objects in all query classes.
See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31666 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 16:34:50 +00:00
Boone Gorges abbbde190c In `WP_User_Query`, `$meta_query` should be a class property rather than a local variable.
This provides better parity with other query classes, and makes it possible to
write more direct unit tests.

See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31665 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 16:34:42 +00:00
Boone Gorges a510aafe46 Fix documentation whitespace after [31663].
See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31664 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 16:07:26 +00:00
Boone Gorges 945fd67d7b Improve 'orderby' syntax for `WP_User_Query`.
This changeset ports a number of 'orderby' features from `WP_Query` and
`WP_Comment_Query`:

* Allow multiple 'orderby' values to be passed as a space-separated list.
* Allow multiple 'orderby' values to be passed as a flat array.
* Allow multi-dimensional 'orderby', with orderby fields as array keys and ASC/DESC as the corresponding values.

See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31663 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 16:05:11 +00:00
Boone Gorges 3262ff0cc8 Tests for some existing 'orderby' functionality in `WP_*_Query` classes.
* In `WP_Query` and `WP_Comment_Query`, ensure that 'orderby' can parse multiple values for 'orderby' when passed as a space-separated string.
* In `WP_User_Query`, ensure that "shorthand" orderbys (like 'login' and 'name') are converted to their full versions (like 'user_login' and 'display_name').

See #31265.

git-svn-id: https://develop.svn.wordpress.org/trunk@31662 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 15:44:28 +00:00
Dominik Schilling (ocean90) 305a44617c Customizer: Add audio/video previews for upload controls.
props celloexpressions, Fab1en, wonderboymusic.
fixes #30850.

git-svn-id: https://develop.svn.wordpress.org/trunk@31661 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 11:05:57 +00:00
Drew Jaynes 9c1ab4eec0 Add a missing `@since 4.2.0` tag to the DocBlock for `wp_attachment_is()`.
See #25275.


git-svn-id: https://develop.svn.wordpress.org/trunk@31660 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 07:11:11 +00:00
Drew Jaynes 37ca5609c8 Better document parameters and the return for the newly-introduced `wp_attachment_is()`.
Also adds a changelog entry to the DocBlock for `wp_attachment_is_image()` to denote that it serves as a wrapper for `wp_attachment_is()` as of 4.2.0.

See [31645]. See #25275.


git-svn-id: https://develop.svn.wordpress.org/trunk@31659 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 07:08:52 +00:00
Jeremy Felt a5fcc34a50 Return HTTP status code 403 in network admin when access is forbidden.
When the error message "You do not have permission to access this page" is used in network admin screens, return an HTTP status code of 403 to match. Previously: [30356] and [31300].

Props yo-l1982.

Fixes #31422.


git-svn-id: https://develop.svn.wordpress.org/trunk@31658 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 05:59:17 +00:00
Jeremy Felt 03b4e1f0aa Return HTTP status code 500 by default in ms_not_installed()
In admin views, specify a response code of 500 when using `wp_die()` to show an expanded message for a broken or missing multisite installation.

On front end views, use `dead_db()` rather than `die()` to generate the generic "Error establishing a database connection" message. `dead_db()` sets a status code of 500 by default and allows for the override of this generic error with a `db-error.php` template.

Props craig-ralston, jeremyfelt.

Fixes #30002.


git-svn-id: https://develop.svn.wordpress.org/trunk@31657 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 05:34:47 +00:00
Jeremy Felt f0b524dad0 Improve experience when deleting users from a multisite network.
When deleting a user who is not associated with any sites, the current messaging can be confusing as only users associated with at least one site actually appear on the confirmation page for deletion.

This experience can be improved by showing all users being deleted as well as their current site associations.

* If an empty array of users is passed, don't attempt to confirm deletion.
* If one user is passed, show a message crafted for a user of one.
* If multiple users are passed, show a message crafted for many.
* Show the pending results of all users to be deleted.
* Update messaging around the deletion/confirmation process to be less misleading.

Props Idealien, HarishChaudhari, DrewAPicture.

Fixes #18132.


git-svn-id: https://develop.svn.wordpress.org/trunk@31656 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 04:39:13 +00:00
Andrew Ozz e651a8bef1 PressThis: make the Preview button "subtle".
See #31458.

git-svn-id: https://develop.svn.wordpress.org/trunk@31655 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 01:49:57 +00:00
Andrew Ozz fba4d3e296 PressThis: add preview functionality. Opens the preview in a new window or a tab next to the source tab.
Fixes #31458.

git-svn-id: https://develop.svn.wordpress.org/trunk@31654 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 01:16:05 +00:00
Boone Gorges b2332718a1 When passing `$full` to `get_posts_by_author_sql()`, make sure a 'post_type' clause is included in results.
This change makes the 'post_type' clause in `wp_list_authors()` redundant, so
we remove it. Third-party plugins using `get_posts_by_author_sql()` may have
similarly redundant clauses, but this won't change the results returned by the
SQL queries.

Also adds unit tests for `get_posts_by_author_sql()`.

Props pbearne.
Fixes #30354.

git-svn-id: https://develop.svn.wordpress.org/trunk@31653 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 01:14:31 +00:00
Drew Jaynes 86b23615ea Remove a duplicate mention of the default value for the `$number` argument in `get_terms()`.
Props iandunn.
Fixes #31526.


git-svn-id: https://develop.svn.wordpress.org/trunk@31652 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-07 01:04:22 +00:00
Andrew Ozz 900468728a PressThis:
- Close the sidebar on moving the focus outside of it (by clicking or by "tabbing").
- Fix a (weird) structural CSS problem where clicks go through the sidebar when it is open.
- Clean up the JS a bit.
Fixes #31457.

git-svn-id: https://develop.svn.wordpress.org/trunk@31651 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 22:56:17 +00:00
Scott Taylor 2058dadaf7 Update NPM Grunt packages: `compress`, `concat`, `copy`, `imagemin` and `uglify`
Props netweb.
Fixes #31489.


git-svn-id: https://develop.svn.wordpress.org/trunk@31650 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 21:13:21 +00:00
Scott Taylor 3d944cc15e Update `grunt-contrib-jshint` to `0.11.0`
Props netweb.
Fixes #31488.


git-svn-id: https://develop.svn.wordpress.org/trunk@31649 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 21:07:35 +00:00
wonderboymusic 689c0982ec Update `grunt-sass` to `0.18.0`.
Props netweb.
Fixes #31343.


git-svn-id: https://develop.svn.wordpress.org/trunk@31648 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 21:04:03 +00:00
Scott Taylor 8a28e19808 Add unit tests for `wp_attachment_is()`, checks the whitelist and arbitrary extension.
See #25275.


git-svn-id: https://develop.svn.wordpress.org/trunk@31647 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 20:37:08 +00:00
Scott Taylor 6d5385be8d After [31645], for the `default` `case`, return the result of checking the extension against the passed type.
See #25275.


git-svn-id: https://develop.svn.wordpress.org/trunk@31646 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 20:27:49 +00:00
Scott Taylor 42bcec5061 Introduce a function, `wp_attachment_is( $type, $post = 0 )`, to collapse the logic for determining whether an attachment is an `image`, `audio`, or `video`.
This is admittedly a first pass. There needs to be a generic handler for when any other type is passed, but for now it accepts the whitelist.

See #25275.


git-svn-id: https://develop.svn.wordpress.org/trunk@31645 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 20:25:09 +00:00
Lance Willett ff67402710 Twenty Fifteen: add ARIA attributes to menu toggle.
See #31527, props davidakennedy, lance.


git-svn-id: https://develop.svn.wordpress.org/trunk@31644 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 17:33:38 +00:00
Scott Taylor eb73416790 For our MediaElement 2.16.4 build + monkey patches, also add from the illustrious dd32:
https://github.com/johndyer/mediaelement/pull/1423

Props dd32.
See [31444], #31541.


git-svn-id: https://develop.svn.wordpress.org/trunk@31643 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 15:46:26 +00:00
Helen Hou-Sandi df65776f88 Media: UI tweaks for Insert from URL.
"Title" field is now labeled as "Link Text", to reflect how it's actually used. It's also hidden whenever the embed is updating, to make it clearer that something is happening. Embed dimension fields are shown below the preview, much like image property fields are shown below.

fixes #29476, see #31139.


git-svn-id: https://develop.svn.wordpress.org/trunk@31642 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 15:02:08 +00:00
Helen Hou-Sandi c9913583e3 Comments: Show more identifying information for moderation and editing.
Attempting to moderate comments without context about the post is more difficult than necessary. The comment moderation screen you are sent to via email link was also in need of some better visual treatment.

props thaicloud, seanchayes, adamsilverstein.
see #23988.


git-svn-id: https://develop.svn.wordpress.org/trunk@31641 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 14:05:05 +00:00
Boone Gorges b9e222fd6a Allow `$autoload` setting to be changed for existing options using `update_option()`.
[31628] made it possible to pass an `$autoload` param to `update_option()` that
applies when the option does not yet exist in the database. The current
changeset introduces parity for existing options: the `$autoload` setting
for existing options can be changed via the `$autoload` parameter. For internal
simplicity, `$autoload` is ignored for existing options when `$value` is not
also changed.

This changeset also moves `update_option()` tests into their own class.

Props dd32.
Fixes #26394.

git-svn-id: https://develop.svn.wordpress.org/trunk@31640 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 13:56:44 +00:00
Boone Gorges 98322a7143 Ensure that an array of object IDs is passed to the 'get_object_terms' filter.
Originally introduced in [31581].

Props doublesharp.
Fixes #18828.

git-svn-id: https://develop.svn.wordpress.org/trunk@31639 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 13:17:09 +00:00
Drew Jaynes 653f2ee36e Correct the `$number` argument description in `get_terms()` to reflect that an empty string or 0 will return all possible results, not -1.
Previously, it was noted that -1 would return all possible results. However, as the value of `$number` is passed through `absint()`, -1 would actually be converted to 1, thereby producing unexpected results.

Props iandunn.
Fixes #31526.


git-svn-id: https://develop.svn.wordpress.org/trunk@31638 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 08:04:32 +00:00
Andrew Ozz 1080a903fc PressThis: when server-side parsing, filter small images by the width and height attributes if set.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31637 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 02:02:03 +00:00
Andrew Ozz e6fcf316b3 PressThis: fix toggling of `aria-expanded` attribute.
Props afercia, see #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31636 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 01:50:56 +00:00