Commit Graph

16394 Commits

Author SHA1 Message Date
Dominik Schilling
13ad2d4e16 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.
Built from https://develop.svn.wordpress.org/trunk@31696


git-svn-id: http://core.svn.wordpress.org/trunk@31677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 15:32:27 +00:00
Dominik Schilling
70b7369935 Comments: Fix undefined $comment_url variable notice, introduced in [31641].
see #23988.
Built from https://develop.svn.wordpress.org/trunk@31695


git-svn-id: http://core.svn.wordpress.org/trunk@31676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 14:51:26 +00:00
Sergey Biryukov
19f1d4f402 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.
Built from https://develop.svn.wordpress.org/trunk@31694


git-svn-id: http://core.svn.wordpress.org/trunk@31675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 05:07:28 +00:00
Andrew Ozz
be24bc3a97 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.
Built from https://develop.svn.wordpress.org/trunk@31693


git-svn-id: http://core.svn.wordpress.org/trunk@31674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 21:49:28 +00:00
Helen Hou-Sandí
fe47177a65 Media library: Revert [31582], as it introduces navigation difficulties for many users.
see #30333.

Built from https://develop.svn.wordpress.org/trunk@31692


git-svn-id: http://core.svn.wordpress.org/trunk@31673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 21:17:29 +00:00
Andrew Ozz
d08bb970ae 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.
Built from https://develop.svn.wordpress.org/trunk@31691


git-svn-id: http://core.svn.wordpress.org/trunk@31672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 20:00:27 +00:00
Scott Taylor
6ffa051689 Replace flagrant instances of .html('') with .empty().
Props OriginalEXE, SergeyBiryukov.
Fixes #27034.

Built from https://develop.svn.wordpress.org/trunk@31690


git-svn-id: http://core.svn.wordpress.org/trunk@31671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 19:44:26 +00:00
Andrew Ozz
15ec9441cb TinyMCE wpView: decode HTML entities before trying to match the wpView text string. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31689


git-svn-id: http://core.svn.wordpress.org/trunk@31670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 19:09:27 +00:00
Drew Jaynes
4815bfc2a0 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.

Built from https://develop.svn.wordpress.org/trunk@31688


git-svn-id: http://core.svn.wordpress.org/trunk@31669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 07:04:27 +00:00
Dion Hulse
4f7856aabe Fix the editable_slug hook documentation, the PHPDoc must come directly before the hook call, with no HTML inbetween.
Props DrewAPicture. Fixes #31569

Built from https://develop.svn.wordpress.org/trunk@31687


git-svn-id: http://core.svn.wordpress.org/trunk@31668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 06:43:26 +00:00
Dion Hulse
8a9181d8d4 SSH2 Upgrade transport: Trim the trailing newline character from the ouput of pwd to avoid a PHP Segfault.
Fixes #30802 for trunk.

Built from https://develop.svn.wordpress.org/trunk@31686


git-svn-id: http://core.svn.wordpress.org/trunk@31667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 04:32:27 +00:00
Scott Taylor
a685aa6670 [31684] has BC issues, revert it.
Props nacin.
See #30799.


Built from https://develop.svn.wordpress.org/trunk@31685


git-svn-id: http://core.svn.wordpress.org/trunk@31666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:36:26 +00:00
Scott Taylor
11ccf8f625 Remove the PHP4 constructor from WP_Widget.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31684


git-svn-id: http://core.svn.wordpress.org/trunk@31665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:25:27 +00:00
Scott Taylor
d577c673e2 self should be used for accessing local static members.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31683


git-svn-id: http://core.svn.wordpress.org/trunk@31664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:22:26 +00:00
Scott Taylor
2bcae51cfd Declare multisite as a field for WP_Object_Cache.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31682


git-svn-id: http://core.svn.wordpress.org/trunk@31663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:18:27 +00:00
Scott Taylor
0ec87e4584 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.

Built from https://develop.svn.wordpress.org/trunk@31681


git-svn-id: http://core.svn.wordpress.org/trunk@31662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:11:28 +00:00
Andrew Ozz
ff5b22b872 PressThis: fix styling of wpLink.
Props Michael-Arestad, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31680


git-svn-id: http://core.svn.wordpress.org/trunk@31661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 23:23:26 +00:00
Scott Taylor
dccf5ceb90 Empty return statements are unnecessary at the end of functions.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31679


git-svn-id: http://core.svn.wordpress.org/trunk@31660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 23:09:27 +00:00
Scott Taylor
b4869ed42f Avoid function calls on each iteration of a for loop.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31678


git-svn-id: http://core.svn.wordpress.org/trunk@31659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 23:01:26 +00:00
Boone Gorges
6aff223ffb jshint fixes for press-this.js.
Built from https://develop.svn.wordpress.org/trunk@31677


git-svn-id: http://core.svn.wordpress.org/trunk@31658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 16:27:28 +00:00
Boone Gorges
d5e42f3d3e Share fixtures across wp_list_authors() tests.
See #30017.
Built from https://develop.svn.wordpress.org/trunk@31676


git-svn-id: http://core.svn.wordpress.org/trunk@31657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 15:58:26 +00:00
Andrew Ozz
7c65a95e4b Fix tagBox init on the Edit Post screen. Props tyxla. Fixes #31558.
Built from https://develop.svn.wordpress.org/trunk@31675


git-svn-id: http://core.svn.wordpress.org/trunk@31656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 04:54:26 +00:00
Jeremy Felt
0f34b98bcf 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.

Built from https://develop.svn.wordpress.org/trunk@31674


git-svn-id: http://core.svn.wordpress.org/trunk@31655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 02:27:27 +00:00
Jeremy Felt
b5b5c98e0a 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.

Built from https://develop.svn.wordpress.org/trunk@31673


git-svn-id: http://core.svn.wordpress.org/trunk@31654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 02:10:30 +00:00
Scott Taylor
c1cab11ceb Use $this-> instead of parent:: when calling tablenav() in WP_Theme_Install_List_Table.
See #30799.

Built from https://develop.svn.wordpress.org/trunk@31672


git-svn-id: http://core.svn.wordpress.org/trunk@31653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 23:03:27 +00:00
Scott Taylor
a91d1c2ab2 Add oEmbed support for Kickstarter.
See #29126.

Built from https://develop.svn.wordpress.org/trunk@31671


git-svn-id: http://core.svn.wordpress.org/trunk@31652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 22:11:26 +00:00
Boone Gorges
ddc556e492 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].
Built from https://develop.svn.wordpress.org/trunk@31670


git-svn-id: http://core.svn.wordpress.org/trunk@31651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 18:48:29 +00:00
Boone Gorges
f5513227db 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.
Built from https://develop.svn.wordpress.org/trunk@31669


git-svn-id: http://core.svn.wordpress.org/trunk@31650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 18:38:27 +00:00
Boone Gorges
4e1a8b195f User query meta_vars test must account for the 'blog_id' clause added in multisite.
See #31265.
Built from https://develop.svn.wordpress.org/trunk@31668


git-svn-id: http://core.svn.wordpress.org/trunk@31649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 17:34:26 +00:00
Andrew Ozz
f02a17e2a1 TinyMCE wpView: improve unbinding of mutationObserver in nested iframes. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31667


git-svn-id: http://core.svn.wordpress.org/trunk@31648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 16:53:27 +00:00
Boone Gorges
9c20c8f7b7 Add tests for the conversion of 'meta_*' query vars to $meta_query objects in all query classes.
See #31265.
Built from https://develop.svn.wordpress.org/trunk@31666


git-svn-id: http://core.svn.wordpress.org/trunk@31647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 16:35:53 +00:00
Boone Gorges
f07ebeff91 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.
Built from https://develop.svn.wordpress.org/trunk@31665


git-svn-id: http://core.svn.wordpress.org/trunk@31646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 16:35:27 +00:00
Boone Gorges
503b36dd23 Fix documentation whitespace after [31663].
See #31265.
Built from https://develop.svn.wordpress.org/trunk@31664


git-svn-id: http://core.svn.wordpress.org/trunk@31645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 16:08:27 +00:00
Boone Gorges
1101444648 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.
Built from https://develop.svn.wordpress.org/trunk@31663


git-svn-id: http://core.svn.wordpress.org/trunk@31644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 16:06:27 +00:00
Boone Gorges
09a9ce9e0a 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.
Built from https://develop.svn.wordpress.org/trunk@31662


git-svn-id: http://core.svn.wordpress.org/trunk@31643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 15:45:31 +00:00
Dominik Schilling
08f0376f91 Customizer: Add audio/video previews for upload controls.
props celloexpressions, Fab1en, wonderboymusic.
fixes #30850.
Built from https://develop.svn.wordpress.org/trunk@31661


git-svn-id: http://core.svn.wordpress.org/trunk@31642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 11:06:29 +00:00
Drew Jaynes
b1a59e9d30 Add a missing @since 4.2.0 tag to the DocBlock for wp_attachment_is().
See #25275.

Built from https://develop.svn.wordpress.org/trunk@31660


git-svn-id: http://core.svn.wordpress.org/trunk@31641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 07:12:28 +00:00
Drew Jaynes
b84904051b 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.

Built from https://develop.svn.wordpress.org/trunk@31659


git-svn-id: http://core.svn.wordpress.org/trunk@31640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 07:09:28 +00:00
Jeremy Felt
80d13281ed 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.

Built from https://develop.svn.wordpress.org/trunk@31658


git-svn-id: http://core.svn.wordpress.org/trunk@31639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 06:00:28 +00:00
Jeremy Felt
3c4b95c1e3 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.

Built from https://develop.svn.wordpress.org/trunk@31657


git-svn-id: http://core.svn.wordpress.org/trunk@31638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 05:35:26 +00:00
Jeremy Felt
63ceacb67a 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.

Built from https://develop.svn.wordpress.org/trunk@31656


git-svn-id: http://core.svn.wordpress.org/trunk@31637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 04:40:28 +00:00
Andrew Ozz
be207e6550 PressThis: make the Preview button "subtle".
See #31458.
Built from https://develop.svn.wordpress.org/trunk@31655


git-svn-id: http://core.svn.wordpress.org/trunk@31636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 01:50:26 +00:00
Andrew Ozz
9716d171c7 PressThis: add preview functionality. Opens the preview in a new window or a tab next to the source tab.
Fixes #31458.
Built from https://develop.svn.wordpress.org/trunk@31654


git-svn-id: http://core.svn.wordpress.org/trunk@31635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 01:17:26 +00:00
Boone Gorges
b421255fc8 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.
Built from https://develop.svn.wordpress.org/trunk@31653


git-svn-id: http://core.svn.wordpress.org/trunk@31634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 01:15:28 +00:00
Drew Jaynes
6486a233c0 Remove a duplicate mention of the default value for the $number argument in get_terms().
Props iandunn.
Fixes #31526.

Built from https://develop.svn.wordpress.org/trunk@31652


git-svn-id: http://core.svn.wordpress.org/trunk@31633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 01:05:26 +00:00
Andrew Ozz
a27967aa05 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.
Built from https://develop.svn.wordpress.org/trunk@31651


git-svn-id: http://core.svn.wordpress.org/trunk@31632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 22:57:26 +00:00
Scott Taylor
47efbd9dcb Update NPM Grunt packages: compress, concat, copy, imagemin and uglify
Props netweb.
Fixes #31489.

Built from https://develop.svn.wordpress.org/trunk@31650


git-svn-id: http://core.svn.wordpress.org/trunk@31631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 21:15:37 +00:00
Scott Taylor
ae90e6a536 Update grunt-contrib-jshint to 0.11.0
Props netweb.
Fixes #31488.

Built from https://develop.svn.wordpress.org/trunk@31649


git-svn-id: http://core.svn.wordpress.org/trunk@31630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 21:08:29 +00:00
Scott Taylor
6dd747f27c Update grunt-sass to 0.18.0.
Props netweb.
Fixes #31343.

Built from https://develop.svn.wordpress.org/trunk@31648


git-svn-id: http://core.svn.wordpress.org/trunk@31629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 21:05:46 +00:00
Scott Taylor
70aec9e406 Add unit tests for wp_attachment_is(), checks the whitelist and arbitrary extension.
See #25275.

Built from https://develop.svn.wordpress.org/trunk@31647


git-svn-id: http://core.svn.wordpress.org/trunk@31628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 20:38:26 +00:00