Commit Graph

5134 Commits

Author SHA1 Message Date
John Blackbourn 1bed706d27 Missed files from [34172].
See #33877

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


git-svn-id: http://core.svn.wordpress.org/trunk@34141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 08:09:24 +00:00
John Blackbourn ec0544e053 Initialise `$_SERVER[ 'REMOTE_ADDR' ]` during the test bootstrap so individual tests need not.
Fixes #33877
Fixes #25162

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


git-svn-id: http://core.svn.wordpress.org/trunk@34140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 08:05:28 +00:00
Scott Taylor ab6d1fa247 Use `get_attached_file()` in `attachment_submitbox_metadata()`.
Props kitchin.
Fixes #33386.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:18:25 +00:00
Scott Taylor 54829b6305 Create a function, `get_preview_post_link()`, to DRY the logic for applying the `'preview_post_link'` filter to a URL.
Props TomHarrigan, wonderboymusic.
Fixes #24345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:15:25 +00:00
Scott Taylor ee42803e21 Move `WP_Screen` to its own file.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:08:24 +00:00
Scott Taylor fde014e85e Move the admin Nav Menu Walker subclasses into their own files. Load in `nav-menu.php` to remain BC.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:02:25 +00:00
Scott Taylor ed25b09942 Update post thumbnail functions to allow a `WP_Post` to be passed.
Adds unit tests.

Props swissspidy, Rahe.
Fixes #33723.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 03:46:25 +00:00
Scott Taylor 780487556b Add a doc block to `WP_List_Table::get_primary_column()`.
Fixes #33854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 03:35:25 +00:00
Scott Taylor ab777c54cc Ensure that widget carets close when dragging an expanded widget.
Props sdavis2702, mindctrl.
Fixes #33578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 03:10:24 +00:00
Scott Taylor 1b0121a841 Add a filter to allow custom headers to be sent via the WP HTTP IXR client: `'wp_http_ixr_client_headers'`.
Props ericmann.
Fixes #24598.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 02:54:24 +00:00
Scott Taylor 191400f9e6 Don't ever use the `guid` value when retrieving URLs for media, use `wp_get_attachment_url()`. Use `get_attached_file()` for path to file.
Fixes #33386.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 02:50:25 +00:00
Scott Taylor d7d5789088 TwentyFifteen|Sixteen themes have a `<div id="content">` in the header. Change the `<div>` IDs in `wp-activate.php` and `wp-signup.php` to be unique to each page.
Props jfarthing84.
Fixes #33843.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 02:09:24 +00:00
Scott Taylor 69e3a390b2 In `_wp_ajax_delete_comment_response()`, read the new `'all'` prop returned by `get_comment_count()` via `wp_count_comments()` when setting `$total`. `'all'` doesn't include `spam` in its count.
Updates unit tests.

Props dipesh.kakadiya.
Fixes #32362.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 01:47:25 +00:00
Scott Taylor cf2aaf8393 In `get_avatar_data()`, promote `stdClass` objects to `WP_Comment` if passed.
Props DrewAPicture, ocean90.
Fixes #32619.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 01:34:25 +00:00
Scott Taylor 387f271ea5 After [34070], account for the new ID in Quick Edit JS.
Props afercia.
Fixes #33770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 01:31:26 +00:00
Scott Taylor 31c2bfd69d More bonkers comment cache cleanup: toggle `wp_defer_comment_counting()` in `wp_insert_post()` and `wp_insert_attachment()`. Move the cache deletion in `wp_update_comment_count_now()` to before the `get_post()` call, so that the caches get deleted even if the post has already been deleted and the function returns early.
See #33875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 00:58:26 +00:00
Scott Taylor 8479ff90bc Ensure that the count cache for `all` is in sync with `comment-{$post_id}` values. These are the values most often relied-upon by the list table for comments.
Adds unit tests.

See #33875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:39:24 +00:00
Dominik Schilling e932a2dc5d XMLRPC: Don't allow private posts to be sticky.
See #20662.
Built from https://develop.svn.wordpress.org/trunk@34135


git-svn-id: http://core.svn.wordpress.org/trunk@34103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:38:23 +00:00
Nikolay Bachiyski 3778cae8ec Shortcodes: don't allow unclosed HTML elements in attributes
Built from https://develop.svn.wordpress.org/trunk@34134


git-svn-id: http://core.svn.wordpress.org/trunk@34102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:36:24 +00:00
Nikolay Bachiyski 097c4fd2f4 List tables: escape user e-mails
Better safe than sorry.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:33:25 +00:00
Scott Taylor 1a01a9ab55 In the `edit-comments.php` admin handler, toggle `wp_defer_comment_counting()` so that only unique post IDs have their comment count updated. Currently, if you delete 50 comments from the same post, the count would get reset 50 times. Not joking.
See #33875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:24:26 +00:00
Scott Taylor 60367d567d The "counts" cache for comments by post id is never invalidated. Neither `wp_update_comment_count()` nor `wp_update_comment_count_now()` touch the cache.
Adds unit test.
See #33875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 22:04:26 +00:00
Scott Taylor 7639a89a1f `wp_unspam_comment()` can accept a full object instead of comment_ID to reduce cache/db lookups..
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 21:47:25 +00:00
Scott Taylor b1bc8a6522 More comment functions can accept a full object instead of comment_ID to reduce cache/db lookups.
See ##33638.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 21:40:24 +00:00
Scott Taylor b2a30103ae In `WP_List_Table`, make a new `public` method, `->get_primary_column()`, and revert [34101] due to BC issues.
Fixes #33854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 20:29:26 +00:00
Scott Taylor 4d33644373 In `WP_Media_List_Table`, fetch all pending comment counts at once, instead of for each row in the loop.
See #11381.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 19:25:25 +00:00
John Blackbourn dbe4a770d5 Implement unit tests which use reflection to test functions in pluggable.php. This means any changes to these functions will need explicit changes to their corresponding tests, which helps prevent unintentional breakage.
Fixes #33867

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


git-svn-id: http://core.svn.wordpress.org/trunk@34094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 19:15:27 +00:00
Boone Gorges ef474c6970 Accept 'ID' as a valid `$field` in `get_user_by()`.
We already accept 'id'. `ID` more closely matches the database and
`WP_User` schemas.

Props Shelob9.
Fixes #33869.
Built from https://develop.svn.wordpress.org/trunk@34125


git-svn-id: http://core.svn.wordpress.org/trunk@34093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 18:58:26 +00:00
John Blackbourn a78e850e9c Add the site icon meta tags to `wp-login.php`.
See #33597
Props iworks

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


git-svn-id: http://core.svn.wordpress.org/trunk@34092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 18:02:24 +00:00
Scott Taylor 3a0db2a22f Fix the case-sensitivity of some HTTP class usage.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 17:37:25 +00:00
John Blackbourn bc6af23302 Update links to the user profile editing screen in the admin toolbar when the current logged in user has no role on the current site. Covers single site and Multisite and introduces tests.
Fixes #25162

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


git-svn-id: http://core.svn.wordpress.org/trunk@34090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 17:10:26 +00:00
Drew Jaynes edd0f2b32f Docs: Add missing parameter and return descriptions for `Walker::get_number_of_root_elements()`.
Fixes #33662.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 15:33:27 +00:00
Sergey Biryukov d9bc36d068 Escape class attribute in `edit_post_link()` after [34098].
Props Offereins.
See #30563.
Built from https://develop.svn.wordpress.org/trunk@34117


git-svn-id: http://core.svn.wordpress.org/trunk@34085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 13:01:25 +00:00
Dominik Schilling 4af3a3374e Passwords: Deprecate second parameter of `wp_new_user_notification()`.
The second parameter `$plaintext_pass` was removed in [33023] and restored as `$notify` in [33620] with a different behavior. If you have a plugin overriding `wp_new_user_notification()` which hasn't been updated you would get a notification with your username and the password "both".
To prevent this the second parameter is now deprecated and reintroduced as the third parameter.

Adds unit tests.

Props kraftbj, adamsilverstein, welcher, ocean90.
Fixes #33654.

(Don't ask for new pluggables kthxbye)
Built from https://develop.svn.wordpress.org/trunk@34116


git-svn-id: http://core.svn.wordpress.org/trunk@34084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 12:43:26 +00:00
Sergey Biryukov 97c0303f41 Docs: Add a changelog entry for the `$class` argument added to `edit_post_link()` in [34098].
Fixes #30563.
Built from https://develop.svn.wordpress.org/trunk@34115


git-svn-id: http://core.svn.wordpress.org/trunk@34083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 12:20:26 +00:00
Dominik Schilling d36ffeb160 Passwords: Trigger a `wp-check-valid-field` event when the password field is filled with a password by `generatePassword()`.
Updates event handler in `wpAjax.invalidateForm()` to support `wp-check-valid-field`.

See #33406.
Built from https://develop.svn.wordpress.org/trunk@34114


git-svn-id: http://core.svn.wordpress.org/trunk@34082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 10:39:27 +00:00
Scott Taylor 5020135a10 Add sanity checks in `map_meta_cap()`, return `'do_not_allow'` when posts don't exist.
Adds unit test.

Props ocean90, nerrad, filosofo.
Fixes #23162.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 04:44:26 +00:00
Boone Gorges 49803a45f3 Send multisite site/user signup emails via hooked functions.
Site and user signup notifications are moved to the new actions
`'after_signup_site'` and `'after_signup_user'`. Site and user activation
notifications are moved to the existing actions `'wpmu_activate_blog'` and
`'wpmu_activate_user'`.

Props dshanske, thomaswm, jeremyfelt.
See #33587..
Built from https://develop.svn.wordpress.org/trunk@34112


git-svn-id: http://core.svn.wordpress.org/trunk@34080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 03:28:24 +00:00
Scott Taylor ecc4106ed1 Add an argument to `parent_dropdown()`, `$post`, to allow it to be called for an arbitrary post.
Fixes #23162.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 03:20:25 +00:00
Scott Taylor 172e37b007 Move `Walker_Category` and `Walker_CategoryDropdown` into their own files via `svn cp`. Remove them from `category-template.php`. Load them in `category.php`. `svn cp` `category.php` over to `category-functions.php`, which also loads now in `category.php`.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 03:10:24 +00:00
Scott Taylor 4cec121d0b Move `Walker_Page` and `Walker_PageDropdown` into their own files via `svn cp`. Remove them from `post-template.php`. Load them in `post.php`.
`post-template.php` loads after `post.php` in `wp-settings.php`. It could probably also be loaded in `post.php`, but avoiding that for the moment.

See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:59:24 +00:00
Scott Taylor 07c6fad006 In `wp_link_pages()`, ensure that `$prev` is greater than `0`.
Props betzster.
Fixes #25273.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:46:24 +00:00
Boone Gorges b62bcef1b1 Send password-change email notifications via hook.
`wp_password_change_notification()` is now called at the 'after_password_reset'
action, rather than being invoked directly from the `reset_password()` function.

In order to make it possible to call `wp_password_change_notification()` as a
`do_action()` callback, the function signature has to be changed so that the
`$user` parameter is expected to be a value rather than a reference. Since
PHP 5.0, objects are passed by reference, so `&$user` was unnecessary anyway.

Props dshanske, thomaswm.
See #33587.
Built from https://develop.svn.wordpress.org/trunk@34107


git-svn-id: http://core.svn.wordpress.org/trunk@34075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:45:25 +00:00
Boone Gorges c614849786 Send comment notification emails via a hooked function.
Previously, `wp_notify_postauthor()` and `wp_notify_moderator()` were called
directly from `wp_new_comment()`, making it difficult to modify or suppress
default notification emails.

Props dshanske, thomaswm.
See #33587.
Built from https://develop.svn.wordpress.org/trunk@34106


git-svn-id: http://core.svn.wordpress.org/trunk@34074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:17:26 +00:00
Scott Taylor 373d73f781 Turn off `autocomplete` for the `new-post-slug` field.
Props johnbillion.
Fixes #32752.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:03:25 +00:00
Dion Hulse 476b5c2046 When running on windows systems, normalise the capitalisation of the drive letter for more reliable string comparisons.
Props tyxla
Fixes #33265

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


git-svn-id: http://core.svn.wordpress.org/trunk@34072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 01:59:25 +00:00
Scott Taylor bae7312f03 Pass `$r` and `$pages` to the 'wp_dropdown_pages' and 'wp_list_pages' filters.
Props bigdawggi, SergeyBiryukov.
Fixes #23734.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 01:32:24 +00:00
Scott Taylor 9604c74f62 Objects are passed by-reference since PHP 5. In `_get_custom_object_labels()`, cast `$object->labels` back to `object` before returning. This function is weird.
Adds unit test.

Props Toro_Unit.
Fixes #33023.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 01:23:26 +00:00
Scott Taylor ae6a3aee7f Make `WP_List_Table::get_primary_column_name()` public in list table classes that have it.
Fixes #33854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 01:12:25 +00:00
Scott Taylor 5077d917a3 Check if the `$post_type` passed to `get_post_type_object()` is a `scalar` value. Non-scalars were producing PHP warnings.
Adds unit tests.

Props Kloon.
Fixes #30013.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 00:03:24 +00:00
Jeremy Felt fa1e1a8850 Multisite: Implement the `get_by_path` method in `WP_Network`.
Move the internals of `get_network_by_path()` to `WP_Network()` and allow network objects to be retrieved by passing a requested domain and path.

Props johnjamesjacoby, jeremyfelt, drewapicture, wonderboymusic.
See #31985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 23:40:24 +00:00
Scott Taylor c745c2deb3 In `edit_post_link()`, add an argument for the class attribute that defaults to `post-edit-link`.
Props voldemortensen.
Fixes #30563.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 23:34:24 +00:00
Jeremy Felt 16b4096779 Multisite: Introduce the `WP_Network` class.
A `WP_Network` object initially matches a row from `wp_site` and is populated with additional properties used by WordPress core. The first iteration is used to retrieve an existing network based on data passed to the class.

* A network can be retrieved by its ID through `WP_Network::get_instance()`, following in the steps of `WP_Post` and `WP_Comment`.
* A network object can be created or completed by passing initial properties in as a standard object to `new WP_Network()`.

Using these methods, we are now able to populate the global `$current_site` during load via this class.

Props johnjamesjacoby, jeremyfelt, drewapicture, wonderboymusic.
See #31985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 23:31:26 +00:00
Andrea Fercia 2a6793c7b2 Bump H3 headings to H2 on the Writing Settings screen for better accessibility.
Props mrahmadawais.
Fixes #33651.
Built from https://develop.svn.wordpress.org/trunk@34096


git-svn-id: http://core.svn.wordpress.org/trunk@34064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 16:48:26 +00:00
Helen Hou-Sandí 7f772bdaff Comments: Fix inline edit/reply on small screens.
props ocean90, SergeyBiryukov.
fixes #33596.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 12:47:27 +00:00
Weston Ruter bd801ae5db Customize: Remove redundant `aria-label` attributes.
Adds an `$options` array argument to `WP_Screen::render_screen_options()` to allow the `div#screen-options-wrap` element to be omitted when `wrap` value is `false`.

Props afercia, westonruter.
Fixes #33182.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 06:16:26 +00:00
Jeremy Felt f7a00464d5 Tests: Update `Tests_Feed_RSS::test_items` to expect new comment permalink structure.
Introduced in [34075] for posts without comments.

Props netweb.
Fixes #19893.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 23:31:25 +00:00
Boone Gorges 1ff03c9d6e Fail gracefully when checking mapped cap against unregistered post type.
Post type objects are reponsible for mapping their capabilities to core caps.
As a result, when the post type is no longer registered, the caps are no
longer mapped. This causes problems when a post is left in the database after
the post type is no longer present, and WP does an 'edit_post' or other cap
check against it: a PHP notice is thrown, and the cap check always fails.

As a more graceful fallback, we map all post-type-dependent caps onto
'edit_others_posts', which allows highly privileged users to be able to
access orphaned content (such as comments belonging to disabled post types),
while minimizing the possibility of unintended privilege escalation.

We also add a `_doing_it_wrong()` notice, so that developers and site
administrators are aware that the cap mapping is failing in the absence of
the registered post type.

Props mitchoyoshitaka, DrewAPicture, imath, codeelite, boonebgorges, nofearinc, SergeyBiryukov, jorbin, dlh.
Fixes #16956.
Built from https://develop.svn.wordpress.org/trunk@34091


git-svn-id: http://core.svn.wordpress.org/trunk@34059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 21:27:25 +00:00
Boone Gorges c0a0d4ba50 Use stricter sanitization for meta query clause keys.
By forcing all clause keys to be strings, we make it possible to use strict
comparison when validating values of 'orderby' as passed to `WP_Query`. This
eliminates situations where the presence of numeric clause keys could result
in an improperly validated 'orderby' value.

Props nikolov.tmw.
Fixes #32937.
Built from https://develop.svn.wordpress.org/trunk@34090


git-svn-id: http://core.svn.wordpress.org/trunk@34058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 21:06:24 +00:00
Boone Gorges fc884dc7ec Allow `setup_postdata()` to accept a post ID.
Previously, it accepted only a full post object.

Props sc0ttclark, mordauk, wonderboymusic.
Fixes #30970.
Built from https://develop.svn.wordpress.org/trunk@34089


git-svn-id: http://core.svn.wordpress.org/trunk@34057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 20:58:23 +00:00
Boone Gorges e0b1340461 Remove extraneous table join in `get_adjacent_post()`.
Since [29248], a table join has not been necessary to process the
`$excluded_terms` parameter of `get_adjacent_post()`. Aside from adding extra
overhead, this join meant that post records that don't have any corresponding
rows in `wp_term_relationships` were erroneously excluded from results.

Fixes #32833.
Built from https://develop.svn.wordpress.org/trunk@34088


git-svn-id: http://core.svn.wordpress.org/trunk@34056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 20:34:24 +00:00
Dominik Schilling 4d5cd90b46 Revert [34013] and parts of [33970].
* `_WP_Editors::wp_mce_translation()` can't be changed without changing strings in TinyMCE and plugins.
* `\u2026` is escaped by `json_encode()` to `\\u2026`, makes `\u2026` visible in our UI.

See #32875.
Built from https://develop.svn.wordpress.org/trunk@34087


git-svn-id: http://core.svn.wordpress.org/trunk@34055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 20:03:24 +00:00
Dominik Schilling 720cea8cf9 Themes: Don't use HTML entities for placeholders.
See #32875.
Built from https://develop.svn.wordpress.org/trunk@34086


git-svn-id: http://core.svn.wordpress.org/trunk@34054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 19:48:24 +00:00
Scott Taylor 8977166746 In `wp_insert_post()`, when setting `$post_author`, use `isset()` instead of `! empty()` to allow `0` to be passed as the value for `$post_author`.
Adds unit tests.

Props ericdaams, wonderboymusic.
Fixes #32585.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 18:54:25 +00:00
Scott Taylor 8591f94b0a `WP_Posts_List_Table`: there are a cadre of `edit.php` URLs that are generated by string-building instead of using our handy functions. Create a helper method, `->get_edit_link()` that standardizes the generation and escaping of these URLs.
Props BdN3504 for the initial patch on the ticket.
Fixes #32376.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 17:13:25 +00:00
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
Scott Taylor bd0a6bbf8c Create `wp-admin/includes/network.php` via `svn cp` and only load it in `wp-admin/network.php`. Move the functions there.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 22:01:24 +00:00
Scott Taylor 1d68ccec25 Move ad hoc Options functions to `wp-admin/includes/options.php`:
* Move `options_discussion_add_js()` from `wp-admin/options-discussion.php`
* Move `options_general_add_js()` from `wp-admin/options-general.php`
* Move `options_permalink_add_js()` from `wp-admin/options-permalink.php`
* Move `options_reading_add_js()` from `wp-admin/options-reading.php`
* Move `options_reading_blog_charset()` from `wp-admin/options-reading.php`

See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:45:24 +00:00
Scott Taylor a40e30e7f4 Move 2 ad hoc user admin functions:
* Move `use_ssl_preference()` from `wp-admin/user-edit.php` to `wp-admin/includes/user.php`.
* Move `admin_created_user_email()` from `wp-admin/user-new.php` to `wp-admin/includes/user.php`.

See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:33:33 +00:00
Scott Taylor 503aa8b76d Move `redirect_post()` from `wp-admin/post.php` to `wp-admin/includes/post.php`.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:31:24 +00:00
Scott Taylor f0b95b7bcc Move `comment_footer_die()` from `wp-admin/comment.php` to `wp-admin/includes/comment.php`.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:29:24 +00:00
Scott Taylor a1d949f361 Move `plugin_sandbox_scrape()` from `wp-admin/plugins.php` to `wp-admin/includes/plugin.php`.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:24:24 +00:00
Scott Taylor f8d7a43920 Move `wp_widgets_access_body_class()` (a hook callback) from `wp-admin/widgets.php` to `wp-admin/includes/widgets.php`.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:22:23 +00:00
Scott Taylor 21dd98695c After [34004], don't break apart the paragraph into multiple translatable strings.
Fixes #18418.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 21:00:24 +00:00
Scott Taylor 98acab10ea Comments/PHP Notices: check that a parent comment exists before displaying an orphan's link to it in the admin.
Props rachelbaker.
Fixes #33710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:51:23 +00:00
Scott Taylor a5529285d1 `_wpThemeSettings.l10n.searchPlaceholder` is an input placeholder and doesn't handle UTF-8 or HTML entities properly. In lieu of using literal Unicode here, use `...`.
See #32875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:36:24 +00:00
Scott Taylor 6ea147d51c After [33970], swap UTF-8 characters for their `\u2026` escape sequence.
See #32875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:30:24 +00:00
Jeremy Felt cc1aade8f5 Multisite: Display content attribution drop down when deleting a user
The previous move from `echo()` to `_e()` left some of the output hanging. Introduced in [32333].

Props figureone.
Fixes #33811 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:26:24 +00:00
Scott Taylor d22fbc7545 Grunt RTL CSS: `swap-dashicons-left-right-arrows` in `rtlcss:properties` expects double-quoted `content` strings in CSS. It doesn't swap single-quoted values.
Props Ankit K Gupta, yoavf, netweb.
Fixes #33786.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:22:25 +00:00
Scott Taylor 641c07533d Clarify `wp-includes/cache.php` docs with some more precise language.
Props danielbachhuber.
Fixes #33734.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 18:24:24 +00:00
Scott Taylor da6101d311 WP Plupload: on `FileUploaded`, allow `success` and `error` callbacks to receive server responses after a successful upload.
Props ippetkov.
Fixes #24934.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 18:19:24 +00:00
Scott Taylor 592f3d9c6c After [33961], ensure that comment filters that expect a comment ID are receiving one.
Props dimadin.
Fixes #33809.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 18:10:25 +00:00
Scott Taylor 8cd584e6ed In `wp_generate_attachment_metadata()`, also pass `$metadata` to the `intermediate_image_sizes_advanced` filter.
Props amereservant, wonderboymusic.
Fixes #23401.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 18:04:24 +00:00
Scott Taylor 6e22d94488 Add a "View" row action for approved comments on the Dashboard screen, remove the link labeled `#`.
Props rachelbaker, zeo.
Fixes #18885. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 17:49:24 +00:00
Scott Taylor 527b5b1405 In `WP_Posts_List_Table::column_date()`, the order of status and time should be switched. It doesn't make sense for phrases like "Last Modified" to occur AFTER the date. Should be before.
Props johnbillion, wonderboymusic.
Fixes #18641. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 17:43:24 +00:00
Scott Taylor 39411b8e61 Cleanup the text for `Publish Settings > Publish` in the `edit-form-advanced` help tab. Clarify that Private posts aren't hidden from editors and administrators.
Props sillybean.
Fixes #18418. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 17:36:24 +00:00
Scott Taylor 52498a8546 In `wp_media_upload_handler()`, replace a lingering instance of `media_upload_gallery()` with `wp_iframe(...)`
Props jeffstieler, antpb.
Fixes #17812. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 17:24:23 +00:00
Scott Taylor 811f76699b `media-new.php`, when using the browser uploader, if the result of uploading is a `WP_Error` - `wp_die()` with the error, instead of redirecting with a generic error.
Props solarissmoke.
Fixes #16820. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 17:18:24 +00:00
Scott Taylor 47409875ab In `get_page_uri()`, do not add parent slugs to orphaned pages.
Adds unit test.

Props filosofo, MikeHansenMe, MikeHansenMe, chriscct7.
Fixes #15963. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 16:54:24 +00:00
Scott Taylor 49b8ccec79 When deleting via User List Table, don't prompt for re-attribution if the user(s) do(es) not have any posts.
Props rajnikmit, wojtek.szkutnik, benjmay, wonderboymusic.
Fixes #6405. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 16:47:24 +00:00
Jeremy Felt 2762f019f7 Multisite: Correct `ms_not_installed()` `@since` version for new parameters
Props dimadin.
See 27264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 16:21:26 +00:00
Sergey Biryukov f9e7fb306c Merge two similar strings.
Props dipesh.kakadiya.
Fixes #33777.
Built from https://develop.svn.wordpress.org/trunk@33998


git-svn-id: http://core.svn.wordpress.org/trunk@33967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 10:59:27 +00:00
Jeremy Felt 52c3be1602 Multisite: Add action to handle network not found
`ms_network_not_found` fires when the global `$current_site` has not been filled and `ms_not_installed()` is about to fire. It cannot be used to populate `$current_site`, but can be used to capture the request and redirect or present a custom error.

Props rmccue.
Fixes #31702.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 05:06:24 +00:00
Jeremy Felt 7278744dd0 Multisite: Remove `$domain` and `$path` globals in `ms_not_installed()`
Further reduces the reliance on these unnecessary globals.

Fixes #27264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 03:53:24 +00:00
Jeremy Felt d1f818a61d Multisite: Allow users with `manage_network_users` to edit network users.
Other users in a network can now be given capabilities to manage users without also having global super admin privileges.

* Users with `manage_network_users` can not edit super admins.
* Users with `manage_network_users` can not promote users to super admin.
* Uses of `is_super_admin()` in `user-new.php` are now updated to `manage_network_users`.

Props daniellandau, chriscct7.
Fixes #16860.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 03:34:23 +00:00
Jeremy Felt cb22d36f61 Multisite: Test `edit_user` capabilities for multisite administrators
An administrator in multisite can not edit users other than itself.

Props daniellandau for the initial patch.
See #16860.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 03:21:24 +00:00
Scott Taylor 52516a68ab After the `global` churn in [33964], also set `$post` to `null` at the end of `WP_Comments_List_Table::single_row()` to ensure that an orphaned comment doesn't inherit the previous row's `$post` context.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 03:12:23 +00:00
Scott Taylor 2c21d12232 Implement a priority system for Help Tabs to add them at specific positions.
Adds unit tests.

Props swissspidy.
Fixes #19828.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 01:27:23 +00:00
Scott Taylor b8c37073d8 Add `@access` docs to `class-wp-filesystem-*` files.
Props wenthemes.
Fixes #33725.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 01:21:24 +00:00
Scott Taylor 2736486f5a Plugins page: re-word "No out of date plugins were selected." to "All selected plugins are up to date." since it's not really an error condition.
Props swissspidy.
Fixes #26494.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 01:11:24 +00:00
Scott Taylor bbbbf11961 After [33821], when dynamically updating the document title text of the Comments List Table page, operate only on the fragment that contains the comment count. This prevents us from including other numbers that may be present in the other title parts (site title, etc).
See #33414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 01:03:25 +00:00
Andrew Ozz 0f3f7160e4 TinyMCE: update to 4.2.5, changelog: http://www.tinymce.com/develop/changelog/?ctrl=version&act=index&pr_id=1.
Fixes #33782 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33981


git-svn-id: http://core.svn.wordpress.org/trunk@33950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 19:45:26 +00:00
Drew Jaynes 55f3b892fb Docs: Add a changelog entry to the DocBlock for `touch_time()` to mention the shift from accessing the global `$comment` to using `get_comment()`.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 15:48:25 +00:00
Drew Jaynes f5c8f20a69 Docs: Use the `$widget_links_args` parameter in the hook doc for the `widget_links_args` filter, introduced when the args array was split out to a variable in [33971].
See #20788.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 15:45:27 +00:00
Scott Taylor 4bdda75696 `WP_Widget_Links`: pass widget instance to `widget_links_args` filter
Props SergeyBiryukov, MikeHansenMe, DrewAPicture.
Fixes #20788.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 04:42:24 +00:00
Scott Taylor 02ae926dfd Round 2 of: We should use ellipses &hellip; / … instead of three dots/periods ... e.g Loading… not Loading...
Props yoavf.
Fixes #32875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 04:39:25 +00:00
Scott Taylor 62ec4a3bfd Deprecate `wp_get_http()` - function isn't used anywhere (apart from itself).
Props swissspidy.
Fixes #33709.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 04:26:25 +00:00
Scott Taylor b05593c0b9 Add a parameter, `$post`, to `get_{$adjacent}_post_join`, `get_{$adjacent}_post_where`, and `get_{$adjacent}_post_sort`
Props JustinSainton.
Fixes #24597.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:49:24 +00:00
Scott Taylor 7ef604c052 Ensure that `role` is not empty before adding it in `add_role()` function and methods.
Props MikeHansenMe, dannydehaan, michielhab.
Fixes #23746.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:42:25 +00:00
Scott Taylor 6d4442ba12 Revisions screen: change language from "Return to post editor" to "Return to editor" - more generic for usage by custom post types.
Props lancewillett, adamsilverstein.
Fixes #31910.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:23:23 +00:00
Scott Taylor 246f2a6bd9 Use `get_comment()` instead of a global in `touch_time()`.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:05:24 +00:00
Scott Taylor 71f955dc84 In `WP_Comments_List_Table`, favor passing `WP_Comment` instances instead of `$comment_ID` to template functions. This allows us to bypass unnecessary cache lookups and simply pass the object through when it is set.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:00:24 +00:00
Scott Taylor d973339738 After [33891], `get_comment()` returns `global $comment` if no args are passed and the global is set (after setting the default to `null` here). This allows us to ditch global comment imports.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 02:51:24 +00:00
Scott Taylor 67f90df6a4 `Walker_Comment` should be in its own file. Loaded now via `wp-includes/comment.php`, which makes it 100% BC.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 02:41:24 +00:00
Scott Taylor 433c786bde After [33891], a lot of comment functions can take `WP_Comment` instead of only accepting `comment_ID`. Update the `@param` docs to reflect this.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 02:34:24 +00:00
Scott Taylor 627396ac0c Speed up `browserify` builds, don't `uglify` the media builds on `watch`.
Props iseulde.
Fixes #31911.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 02:12:24 +00:00
Scott Taylor 5c9e3b00ce Pre-req for Media builds: make sure the watcher actually works for `browserify`.
See #31911.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 02:03:24 +00:00
Scott Taylor 8879565c0a In `WP_User`, add `@property` docs for `description`, `first_name`, and `last_name`. `user_firstname` and `user_lastname` only exist for back-compat.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 01:13:24 +00:00
Scott Taylor 5e9e1d14bd `WP_Theme` has an ad hoc property in `WP_MS_Themes_List_Table`, `$update`. This can be set to a default value on the class, as it's not obtained via `__get()`.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 01:02:24 +00:00
Scott Taylor 128cc02f39 In `wpdb::get_col_length()`, the final `return false` is unreachable since the default `switch` case returns.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 00:48:26 +00:00
Andrew Ozz 4e7dd2c4b1 Formatting: maintain the content of HTML comments when they contain `<object>` tags. Add more tests for wpaitop().
Props miqrogroove.
Fixes #33645 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33955


git-svn-id: http://core.svn.wordpress.org/trunk@33924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 22:55:24 +00:00
Scott Taylor c1bb5b5ce3 After [33843], update the location of some files in `This filter is documented in` docs
Props dimadin.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 22:17:26 +00:00
Scott Taylor 3d8199c4eb Multisite: Don't allow sites to be created with the following reserved slugs: `wp-admin`, `wp-content`, `wp-includes`
Props austinginder.
Fixes #33615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 19:32:24 +00:00
Scott Taylor 0c97b3625e After [33814], `checked()` outputs a leading space, so some extra spaces can be removed in the HTML for default widget forms.
See #23012.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 19:23:24 +00:00
Scott Taylor 00c8fe6b38 Bump the timeout in `trackback()` to 10 seconds (from 4) to match `wp_xmlrpc_server::pingback_ping()` and prevent trackback timeouts.
Props gnaka08 for the initial patch.
Fixes #10414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 18:56:25 +00:00
Scott Taylor 1cd398db0e After [33840], JS regex needs the `g` modifier.
Add another unit test case.

Props kitchin.
Fixes #22781.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 16:44:26 +00:00
Gary Pendergast 40f45a0b89 Tests: Check that `readme.html` is recommending an actively supported version of MySQL.
Per the MySQL support guidelines (https://www.mysql.com/support/), Oracle provides active support for MySQL releases for 5 years from the General Availality release.

See #33758.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 03:24:26 +00:00
Andrea Fercia a49f9ef68f Bump H3 headings to H2 on the Network Add New User screen for better accessibility.
Props Cheffheid.
Fixes #33605.
Built from https://develop.svn.wordpress.org/trunk@33945


git-svn-id: http://core.svn.wordpress.org/trunk@33914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 16:03:25 +00:00
Gary Pendergast c44c7338c0 Tests: Add an extra warning message when checking the recommended PHP version.
See #33758.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 07:28:24 +00:00
Weston Ruter 7c6534fd4c Customize: Fix logic for determining the container element when focusing on a panel, section, or control.
Fixes #33695 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 05:59:24 +00:00
Weston Ruter 274373afc6 Customize: Fix clearing of a color control's setting by using proper empty value.
Props stevehenty.
Fixes #30280.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 05:48:23 +00:00
Gary Pendergast 066c30b41e Readme: Update the recommended PHP version to 5.6.
This also includes a unit test to ensure we're only recommending actively supported versions of PHP in the future.

Fixes #33758.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 05:23:24 +00:00
Dion Hulse 580ca68e26 Cron: Reject events when the provided `$timestamp` is not a valid timestamp.
Invalid timestamps were previously accepted by the scheduling functions but would never be run due to our implementation which caused the cron option to forever contain the events.
This rejects such events which most likely only occur due to developer error.

Props utkarshpatel, wonderboymusic, SergeyBiryukov.
See #33423, Fixes #33475

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


git-svn-id: http://core.svn.wordpress.org/trunk@33905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 02:39:23 +00:00
Dion Hulse 36bda54e88 Favicon: Do not specify a `Content-Length: 0` header for our "empty" response to fail more gracefully on environments with extra whitespace on output.
This allows for the web server to generate the appropriate `Content-Length` header for the request, allowing for strict clients/proxies/servers to process the response.

Props swissspidy.
Fixes #33626

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


git-svn-id: http://core.svn.wordpress.org/trunk@33904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-07 02:18:26 +00:00
Sergey Biryukov a3f82f92f1 Widgets: Don't display sidebar description container if it's empty.
Props paulwilde.
Fixes #32448.
Built from https://develop.svn.wordpress.org/trunk@33934


git-svn-id: http://core.svn.wordpress.org/trunk@33903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-06 07:59:24 +00:00
Sergey Biryukov c177344508 Merge two permission error strings.
Props pavelevap.
Fixes #33745.
Built from https://develop.svn.wordpress.org/trunk@33933


git-svn-id: http://core.svn.wordpress.org/trunk@33902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-06 06:42:26 +00:00
Sergey Biryukov c65f37f892 Correct description for `version` and `current_version` parameters in `wp_check_browser_version()` response.
Props extendwings.
Fixes #33753.
Built from https://develop.svn.wordpress.org/trunk@33932


git-svn-id: http://core.svn.wordpress.org/trunk@33901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-06 00:17:24 +00:00
Sergey Biryukov 0424d962e1 Update the parameter docs for `wp_add_post_tags()`, `wp_set_post_tags()`, and `wp_set_post_terms()`.
Props johnbillion.
Fixes #33749.
Built from https://develop.svn.wordpress.org/trunk@33931


git-svn-id: http://core.svn.wordpress.org/trunk@33900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-06 00:12:26 +00:00
Sergey Biryukov 4b5ef333a0 Correct the docblock for `wp_list_widget_controls()`.
Props swissspidy.
Fixes #33751.
Built from https://develop.svn.wordpress.org/trunk@33930


git-svn-id: http://core.svn.wordpress.org/trunk@33899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 23:38:25 +00:00
John Blackbourn 504cd3bf15 Remove the 'Site Admin' link from the Meta widget if the user doesn't have access to the admin area.
See #25162

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


git-svn-id: http://core.svn.wordpress.org/trunk@33898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 23:25:24 +00:00
Sergey Biryukov 48a41a6663 List tables: Adjust the styles for checkbox column to align better with longer column names.
Props swissspidy.
Fixes #32825.
Built from https://develop.svn.wordpress.org/trunk@33928


git-svn-id: http://core.svn.wordpress.org/trunk@33897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 23:16:23 +00:00
John Blackbourn f482b909e6 Introduce a new `$is_edge` global for the Microsoft Edge browser.
The `$is_IE` and `$is_chrome` globals no longer return `true` for Edge, which is expected as Edge is its own browser and should not be treated like IE. While it might be beneficial for Edge to be treated like Chrome on the client side, it benefits nobody for the `$is_chrome` global to return true.

See #33193
Props gregrickaby, johnbillion

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


git-svn-id: http://core.svn.wordpress.org/trunk@33896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 22:33:23 +00:00
Scott Taylor 15b487b097 After [33925], rename the unit test class to `Tests_Comment_Meta_Cache` to avoid collisions on the PHP 5.2 superhighway.
See #16894.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 22:30:24 +00:00
Scott Taylor c231add9fe In `wp_list_comments()`, update the comment meta cache when the comments derive from `WP_Query` and the new `->comment_meta_cached` prop is `false`.
There are no uses of `wp_list_comments()` in Core where `$comments` are passed as the 2nd argument.

Adds unit tests.

Props wonderboymusic, bradt.
Fixes #16894.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 22:25:24 +00:00
John Blackbourn 3361f90a1c When a user with no role logs in, redirect them to the home page rather than their profile screen which they do not have access to.
See #25162

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


git-svn-id: http://core.svn.wordpress.org/trunk@33893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 21:34:24 +00:00
John Blackbourn bdde0261bc Bail out early from `esc_url()` if the URL becomes empty after stripping out disallowed characters.
Fixes #28015
Props jesin for the unit test

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


git-svn-id: http://core.svn.wordpress.org/trunk@33892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 21:29:25 +00:00
John Blackbourn 9e6f9a5d93 Function docs for the `tax_input` and `meta_input` parameters available for `wp_insert_post()`.
See #20451

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


git-svn-id: http://core.svn.wordpress.org/trunk@33891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 21:02:24 +00:00
Jeremy Felt af557379da Multisite: Update help tab text for `site-info.php` to reference "site URL".
In [32759] and [33586], we combined the domain and path entry for a site to a single "Site URL" field. This updates the help text to reflect that.

Fixes #33748. See #22383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:53:24 +00:00
John Blackbourn 4d76ce2521 Implement a language chooser on the Network Admin -> Sites -> Add New screen.
Props DrewAPicture
Fixes #33528

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


git-svn-id: http://core.svn.wordpress.org/trunk@33889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:47:24 +00:00
Sergey Biryukov 695d3ee98b Merge two strings in `Walker_Comment::comment()` and `Walker_Comment::html5_comment()`.
Props pavelevap.
Fixes #33744.
Built from https://develop.svn.wordpress.org/trunk@33919


git-svn-id: http://core.svn.wordpress.org/trunk@33888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:46:24 +00:00
Jeremy Felt 122862b570 Multisite: Pass the ID of the site being updated to `wpmu_update_blog_options` action.
Props @swissspidy, @MikeHansenMe.
Fixes #32907.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:39:24 +00:00