Commit Graph

29162 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90) 179a1b7a4c Customizer: Introduce `WP_Customize_Media_Control`.
`WP_Customize_Media_Control` is a new base class for all Customizer media controls. If used directly it supports the ID of an attachment instead of an URL like `WP_Customize_Upload_Control`.

props celloexpressions.
fixes #29215.

git-svn-id: https://develop.svn.wordpress.org/trunk@31698 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 18:01:42 +00:00
Dominik Schilling (ocean90) 557ecd19c6 Customizer: Add loading indicators for the Customizer preview.
props Fab1en, westonruter.
fixes #31196.

git-svn-id: https://develop.svn.wordpress.org/trunk@31697 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 15:55:28 +00:00
Dominik Schilling (ocean90) 3bb3d2f1a5 Screen Options: Improve items per page option label.
Previously the label just said "Posts", "Pages", or "Comments". This was bad in terms of accessibility and internationalization because of missing context.
This change adds a default label "Number of items per page:" to `WP_Screen->render_per_page_options()` and removes all the existing one-word labels.

props afercia.
fixes #31349, #15576.

git-svn-id: https://develop.svn.wordpress.org/trunk@31696 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 15:31:54 +00:00
Dominik Schilling (ocean90) b1bbce3f6e Comments: Fix undefined `$comment_url` variable notice, introduced in [31641].
see #23988.

git-svn-id: https://develop.svn.wordpress.org/trunk@31695 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 14:50:50 +00:00
Sergey Biryukov 5fe8182c7f EXIF/IPTC captions should populate Caption (`post_excerpt`) on upload, not Description (`post_content`).
Make sure the caption is always set if found. Previously, if the caption was less than 80 characters, only the Title field would be set.

props beaulebens, ericlewis, bendoh, SergeyBiryukov.
fixes #22768.

git-svn-id: https://develop.svn.wordpress.org/trunk@31694 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-10 05:06:39 +00:00
Andrew Ozz e0f843cd81 PressThis:
- Filter and select the content on the PHP side. Then pass only the needed data to JS.
- Add the suggested post title and contend directly to the HTML.
- Standardise the data type names.
- Some cleanup/reduction of the code in the bookmarklet.
See #31373.

git-svn-id: https://develop.svn.wordpress.org/trunk@31693 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 21:48:38 +00:00
Helen Hou-Sandi 7c60125e15 Media library: Revert [31582], as it introduces navigation difficulties for many users.
see #30333.


git-svn-id: https://develop.svn.wordpress.org/trunk@31692 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 21:16:47 +00:00
Andrew Ozz 7baa0da965 TinyMCE: when pasting an URL over a selection, insert a link with the URL instead of replacing the selection with it. Props iseulde. Fixes #31571.
git-svn-id: https://develop.svn.wordpress.org/trunk@31691 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 19:59:14 +00:00
Scott Taylor 69c449963e Replace flagrant instances of `.html('')` with `.empty()`.
Props OriginalEXE, SergeyBiryukov.
Fixes #27034.


git-svn-id: https://develop.svn.wordpress.org/trunk@31690 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 19:43:49 +00:00
Andrew Ozz 64e63da3f6 TinyMCE wpView: decode HTML entities before trying to match the wpView text string. Props iseulde. See #31412.
git-svn-id: https://develop.svn.wordpress.org/trunk@31689 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 19:08:05 +00:00
Drew Jaynes 5bbb7dd80d Update hook docs for the `editable_slug` filter as it is evaluated in more than just a term slug context, it is also leveraged for use with post URIs.
See #31569.


git-svn-id: https://develop.svn.wordpress.org/trunk@31688 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 07:03:12 +00:00
Dion Hulse 1f90e70b7d Fix the editable_slug hook documentation, the PHPDoc must come directly before the hook call, with no HTML inbetween.
Props DrewAPicture. Fixes #31569


git-svn-id: https://develop.svn.wordpress.org/trunk@31687 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 06:42:58 +00:00
Dion Hulse b96b1db015 SSH2 Upgrade transport: Trim the trailing newline character from the ouput of `pwd` to avoid a PHP Segfault.
Fixes #30802 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@31686 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-09 04:31:21 +00:00
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