Commit Graph

31162 Commits

Author SHA1 Message Date
Scott Taylor
a2aca8d063 Use table-layout: auto (instead of fixed) on table.fixed to ensure that things like date/time don't horrendously wrap on small screens. Before/After screenshots attached to the ticket.
Props gaelan.
Fixes #32691.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 16:04:25 +00:00
Scott Taylor
5a21742a6f wp_delete_post(): add a filter, 'pre_delete_post', to allow bailout from the function if the filter returns a non-null value.
Props boonebgorges.
Fixes #32933.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 15:59:24 +00:00
Scott Taylor
891b76e034 sanitize_post(): the default value for $context is 'display'. The documentation says the default for sanitize_post_field() is 'display', but there is no default for the arg. Make the argument: $context = 'default'.
Props morganestes.
Fixes #33117.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 15:46:25 +00:00
Scott Taylor
0b412d3333 sanitize_post() is polymorphic, add an is_array() check for $post before operating on it as an array.
Props morganestes.
Fixes #33118.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 15:38:27 +00:00
Dominik Schilling
620abd39a1 Bundled Themes: Update Tested up to.
Props mercime.
Fixes #33794.
Built from https://develop.svn.wordpress.org/trunk@34079


git-svn-id: http://core.svn.wordpress.org/trunk@34047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 12:47:25 +00:00
Scott Taylor
281faeb69d After [34076], fix the logic for post_status in months dropdown.
See #21015.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 08:19:24 +00:00
Scott Taylor
eb230b5424 List Tables: don't render "extra tablenav" if there are no posts. This includes Bulk Actions, Dates Dropdown, Category Dropdowns, Pagination.
Also ensure that the Months dropdown, when it is shown, shows months from the proper set of posts.

Props egower, CoenJacobs, MikeHansenMe, mehulkaklotar.
Fixes #33824, #21015, #21856.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 08:13:24 +00:00
Scott Taylor
41c5bfb493 Comments: get_comments_link() should return a link with #respond as the hash instead of #comments if get_comments_number() returns 0.
Props cgrymala, wonderboymusic.
Fixes #19893.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 07:36:25 +00:00
Scott Taylor
ed83979728 AJAX Reply to Comment: check the edit_comment cap when parent comment will be auto-approved.
Props rachelbaker.
Fixes #23939.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 07:19:25 +00:00
Boone Gorges
1a203b5328 Better default values in WP_Query::get_queried_object().
Setting the default value of the `queried_object_id` property to `0` meant
that, when called early enough in the WP bootstrap, `get_queried_object()`
could short-circuit the normal query by fooling it into thinking that the
request was for a page with id 0. Setting the default value to `null` instead
avoids this problem.

Props gradyetc, jazbek.
Fixes #31355.
Built from https://develop.svn.wordpress.org/trunk@34073


git-svn-id: http://core.svn.wordpress.org/trunk@34041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 03:37:23 +00:00
Scott Taylor
4dbaf63b67 Edit Comment screen: remove the "View Comment" button (actually a link) from the publish meta box. Mimic the "Edit URL/Permalink" UI from the Edit Post screen to show the comment link below the screen title, but make it an actual link, not a button.
Props ocean90, DrewAPicture, wonderboymusic.
Fixes #19168.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 03:20:24 +00:00
Scott Taylor
1cbda0e1eb Comments: comment_link() currently takes no arguments, yet get_comment_link() does. Allow comment_link() to optionally take the same arguments.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 03:16:23 +00:00
Scott Taylor
821939d6d1 Quick Edit: fix an ID attribute name collision by renaming one of the author fields author-name.
Props afercia.
Fixes #33770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 02:35:25 +00:00
Scott Taylor
b453af5718 When clicking "Show More Comments" in the Comments meta box on the Edit Post screen, change the click behavior to call a new class method on commentsBox, ->load(), that resets st (cool name) to the number of visible <tr>s before calling ->get(). This will account for spam'd and trash'd comments when returning comments at the proper offset.
Props utkarshpatel.
Fixes #33829.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 02:28:26 +00:00
Andrew Ozz
a69e71fafe Settings, password field: fix placement of the error icon and removal of the error class.
Props liljimmi, adamsilverstein.
Fixes #33406 for trunk.
Built from https://develop.svn.wordpress.org/trunk@34068


git-svn-id: http://core.svn.wordpress.org/trunk@34036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 00:10:25 +00:00
Andrea Fercia
a751eccdf2 Bump H3 headings to H2 on the Plugin Editor screen for better accessibility.
Fixes #33839.
Built from https://develop.svn.wordpress.org/trunk@34067


git-svn-id: http://core.svn.wordpress.org/trunk@34035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 00:08:24 +00:00
Andrea Fercia
f446d01b4c Bump H3 headings to H2 on the Theme Editor screen for better accessibility.
Props mrahmadawais.
Fixes #33660.
Built from https://develop.svn.wordpress.org/trunk@34066


git-svn-id: http://core.svn.wordpress.org/trunk@34034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 00:00:24 +00:00
Andrea Fercia
085d051305 Nav Menus: fix the quick search spinner position on Operating Systems that show scrollbars.
Fixes #33290.
Built from https://develop.svn.wordpress.org/trunk@34065


git-svn-id: http://core.svn.wordpress.org/trunk@34033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 23:52:25 +00:00
Andrea Fercia
5f5ea8c3e2 Quick Edit: fix the Tags auto-suggest tooltip visibility.
Be sure to hide the `jquery.suggest` Tags textarea tooltip also when using the keyboard to Save/Cancel.

Props rommelxcastro for the initial patch.
Fixes #32580.
Built from https://develop.svn.wordpress.org/trunk@34064


git-svn-id: http://core.svn.wordpress.org/trunk@34032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 23:34:25 +00:00
Andrew Ozz
e1ccdf760e Settings: properly set the password field label on loading.
See #33778.
Built from https://develop.svn.wordpress.org/trunk@34062


git-svn-id: http://core.svn.wordpress.org/trunk@34030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 23:05:24 +00:00
Andrew Ozz
0406f50cfb Settings: reassign the label when switching password fields so it always highlights the visible field.
Props umesh.nevase.
Fixes #33778 for trunk.
Built from https://develop.svn.wordpress.org/trunk@34061


git-svn-id: http://core.svn.wordpress.org/trunk@34029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 22:52:26 +00:00
Dominik Schilling
efcdeea2f1 Passwords: Refresh password fields when content is pasted into fields.
Use feature detection to determine whether password inputs should use the `keyup` or `input` event.

Props peterwilsoncc, adamsilverstein.
Fixes #33398.
Built from https://develop.svn.wordpress.org/trunk@34060


git-svn-id: http://core.svn.wordpress.org/trunk@34028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 21:52:27 +00:00
Scott Taylor
cd7c0f0b0d Introduce wp_validate_action( $action = '' ), a helper function that checks $_REQUEST for action and returns it, or empty string if not present. If $action is passed, it checks to make sure they match before returning it, or an empty string. Strings are always returned to avoid returning multiple types.
Implementing this removes 27 uses of direct superglobal access in the admin.

For more reading:
https://codeclimate.com/github/WordPress/WordPress/wp-admin/edit-comments.php

See #33837.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 21:08:26 +00:00
Dominik Schilling
d6f26e4c7c Site Icon: For preview fall back to full size URL when thumbnail size doesn't exist.
Prevents a JavaScript error for rare cases when cropping is skipped and the image is smaller than `thumbnail`.

Props tyxla.
Fixes #33417.
Built from https://develop.svn.wordpress.org/trunk@34056


git-svn-id: http://core.svn.wordpress.org/trunk@34024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 20:13:25 +00:00
Dominik Schilling
09b159e494 About: Remove period from placeholder.
The position of periods is different in some languages, like Japanese. This removes the period from the last placeholder for the Template Hierarchy section. It doesn't include a new period to avoid a string change in a minor release.

Props extendwings, chriscct7.
Fixes #33429.
Built from https://develop.svn.wordpress.org/trunk@34054


git-svn-id: http://core.svn.wordpress.org/trunk@34022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 19:27:24 +00:00
Dominik Schilling
a03488dbf6 Users: Import the global var $wp_hasher in wp_new_user_notification().
Adds `@global` entries to the DocBlock.

Fixes #33826.
Built from https://develop.svn.wordpress.org/trunk@34052


git-svn-id: http://core.svn.wordpress.org/trunk@34020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 19:10:26 +00:00
Dominik Schilling
008dca20b4 Docs: Fix DocBlock formatting for wp_insert_term().
Built from https://develop.svn.wordpress.org/trunk@34051


git-svn-id: http://core.svn.wordpress.org/trunk@34019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 18:48:24 +00:00
Scott Taylor
fa7bc4fda0 Upgrade MediaElement to 2.18.1 - monkey-patches to allow H264 in Chromium.
Changelog: https://github.com/johndyer/mediaelement/compare/2.17.0...2.18.1

See #33798.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 18:35:26 +00:00
Scott Taylor
2f0fc3b97d After [34048], restore the else statement for h (height of video) in wp_underscore_video_template().
See #33798.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 18:30:26 +00:00
Scott Taylor
4b4f08c7a0 In [30082], hardcoded heights were removed on the front end for videos rendered via shortcode. These values were not removed from the admin, which was an oversight.
See #33798.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 18:27:25 +00:00
Scott Taylor
8ec224c2f9 Revert [34009], broke uploads.
See #24934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 18:04:26 +00:00
Sergey Biryukov
0ffe65cf5c Use _x() instead of string hacks for weekday and month abbreviations.
Props johnbillion.
Fixes #33716.
Built from https://develop.svn.wordpress.org/trunk@34046


git-svn-id: http://core.svn.wordpress.org/trunk@34014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 15:36:25 +00:00
Sergey Biryukov
99c85c5b45 Update the length limit in set_transient() docs after [34030].
Props OriginalEXE.
Fixes #13310.
Built from https://develop.svn.wordpress.org/trunk@34045


git-svn-id: http://core.svn.wordpress.org/trunk@34013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 15:10:27 +00:00
Sergey Biryukov
d9b7d915c2 Document @return value for wp_unschedule_event().
See #33475.
Built from https://develop.svn.wordpress.org/trunk@34044


git-svn-id: http://core.svn.wordpress.org/trunk@34012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 11:35:24 +00:00
Sergey Biryukov
f130fd6c32 Better align table headers with table cells on success screen after installing.
Props umesh.nevase.
Fixes #33796.
Built from https://develop.svn.wordpress.org/trunk@34043


git-svn-id: http://core.svn.wordpress.org/trunk@34011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 11:26:26 +00:00
Scott Taylor
db4f22bfb5 After [33961], pass $comment to get_comment_link() where possible to avoid extra cache/db lookups.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 06:21:25 +00:00
Scott Taylor
c3f642bea9 After [33961], pass $comment to get_comment_date() where possible to avoid extra cache/db lookups.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 06:15:24 +00:00
Scott Taylor
58c3c30e8d After [33961], pass $comment to comment_class() where possible to avoid extra cache/db lookups.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 06:12:24 +00:00
Scott Taylor
fc328f5484 After [33961], pass $comment to get_comment_author_link() where possible to avoid extra cache/db lookups.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 06:05:24 +00:00
Scott Taylor
4465a83b95 After [34015], handle orphaned comments in the Dashboard comments widget. Pass full $comment versus just passing the comment ID when possible.
See #33710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 05:56:24 +00:00
Scott Taylor
b9bbdabfe7 Create a new file, wp-admin/includes/noop.php, which loads all of the noop functions for load-script|styles.php and is only loaded by those files. DRYs in the process.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 05:04:23 +00:00
Scott Taylor
db9c5c81f5 Move ad hoc functions from wp-admin/credits.php to wp-admin/includes/credits.php, which is only included by the former.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 04:55:26 +00:00
Boone Gorges
cb462fa5ab Add unit tests for get_term().
These tests will be useful as we begin to refactor in favor of `WP_Term`.

See #14162.
Built from https://develop.svn.wordpress.org/trunk@34035


git-svn-id: http://core.svn.wordpress.org/trunk@34003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 03:11:24 +00:00
Boone Gorges
39fb7992a9 Require numeric IDs in user deletion functions.
`wp_delete_user()` and `wpmu_delete_user()` both require an `$id` parameter.
Previously, the functions did not verify that the value passed was, in fact,
a number. As such, passing an object or any other entity that would be cast
to int `1` would result in user 1 being deleted. We fix this by enforcing
the requirement that `$id` be numeric.

Props dipesh.kakadiya, utkarshpatel, juliobox.
Fixes #33800.
Built from https://develop.svn.wordpress.org/trunk@34034


git-svn-id: http://core.svn.wordpress.org/trunk@34002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 02:25:23 +00:00
Boone Gorges
9a8a28998d Move wp_delete_user() tests to their own file.
See #33800.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 01:51:25 +00:00
Gary Pendergast
0d85038ce6 Schema: Increase the length of wp_options.option_name.
It's pretty easy to run over the `option_name` length, which causes undefined behaviour when inserting and retrieving options. Increasing the length from `VARCHAR(64)` to `VARCHAR(191)` significantly reduces the risk of this occurring.

Because `option_name` has a `UNIQUE` index, we can only increase it to 191 characters, rather than 255. The index can only use a prefix of 191 characters, so will incorrectly restrict long different strings that have the same prefix, if we make the column longer.

Props scribu, OriginalEXE, khromov, MikeHansenMe, netweb, pento.

Fixes #13310.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 01:26:24 +00:00
Aaron Jorbin
c09b0477b2 Flush rewrite rules upon theme switch
Themes can ( and do ) but shouldn't include custom rewrite rules.This can lead to hard to debug issues for theme authors. Theme changes are not a ultra common conclusion. Flushing the rewrite rules on theme switch will lead to a clean slate for each theme which helps make debugging easier.

And @nacin said we should do this 5 years ago at WordCamp Mid Atlantic.

Fixes #14849


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


git-svn-id: http://core.svn.wordpress.org/trunk@33997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 23:50:24 +00:00
John Blackbourn
9bf86a74d0 Set the secure flag on the wp-saving-post cookie when using HTTPS.
This cookie doesn't contain any sensitive information, but this change brings its behaviour in line with all other core cookies.

Fixes #31056

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


git-svn-id: http://core.svn.wordpress.org/trunk@33996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 22:42:23 +00:00
Scott Taylor
5918b30cdd Move network_settings_add_js() from wp-admin/network/settings.php to wp-admin/includes/ms.php.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 22:24:24 +00:00
Scott Taylor
2d2e3c911e Move confirm_delete_users() from wp-admin/network/users.php to wp-admin/includes/ms.php.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 22:23:46 +00:00