Commit Graph

31268 Commits

Author SHA1 Message Date
Scott Taylor
1e3807c10d wp-admin/includes/template.php is now a loader for 3 files made via svn cp:
* `Walker_Category_Checklist` class
* `WP_Internal_Pointers` class
* `template-functions.php`

This is BC for plugins that are loading `wp-admin/includes/template.php` for fun.

See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 15:35:23 +00:00
Sergey Biryukov
aee733684b Docs: Synchronize the $timezone parameter description between get_lastpostdate(), get_lastpostmodified(), and _get_last_post_time().
See #17455.
Built from https://develop.svn.wordpress.org/trunk@34240


git-svn-id: http://core.svn.wordpress.org/trunk@34204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 15:29:39 +00:00
Sergey Biryukov
15b69a0862 Docs: Fix some syntactical issues with the DocBlock for wp_mail_failed action, introduced in [34221].
Fixes #18926.
Built from https://develop.svn.wordpress.org/trunk@34239


git-svn-id: http://core.svn.wordpress.org/trunk@34203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 15:13:26 +00:00
Sergey Biryukov
d06f5817f8 Docs: Expand the DocBlock for the WP_Theme::get_edit_link() method, introduced in [34084].
Fixes #32376.
Built from https://develop.svn.wordpress.org/trunk@34238


git-svn-id: http://core.svn.wordpress.org/trunk@34202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 15:01:27 +00:00
Drew Jaynes
b1f176582c Docs: Add changelog entries for parameters where WP_Comment object support was added in [33961].
See #33638. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 13:52:25 +00:00
Drew Jaynes
4a69b4d275 Docs: Fix some syntactical issues with the DocBlock for the WP_Theme->update property, introduced in [33957].
Adds an `@since`.

See #33491. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 13:29:25 +00:00
Drew Jaynes
fd60f500c3 Docs: Add a changelog entry for the addition of 'wp-admin', 'wp-content', and 'wp-includes' as reserved names for the subdirectory_reserved_names filter docs.
The new names were introduced in [33952].

See #33615. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 13:26:26 +00:00
Drew Jaynes
13c25f5f49 Docs: Put "it's" in its place (again).
Props kitchin.
Fixes #33894.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 12:46:28 +00:00
Sergey Biryukov
53ac914bd5 Add a comment to strings where the ellipsis cannot be used due to json_encode(), placeholders, or external dependencies.
Fixes #32875.
Built from https://develop.svn.wordpress.org/trunk@34233


git-svn-id: http://core.svn.wordpress.org/trunk@34197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 11:59:26 +00:00
Sergey Biryukov
19bcadf2a6 Reset Password: Move <div> out of <p> in wp-login.php.
Props ldinclaux.
Fixes #33892.
Built from https://develop.svn.wordpress.org/trunk@34232


git-svn-id: http://core.svn.wordpress.org/trunk@34196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 11:46:25 +00:00
Sergey Biryukov
4c019c6aee Comments: Fix a fatal error in Comments meta box after [34223].
Props tyxla.
Fixes #33893. See #33413.
Built from https://develop.svn.wordpress.org/trunk@34231


git-svn-id: http://core.svn.wordpress.org/trunk@34195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 11:37:25 +00:00
Drew Jaynes
faa54e4dc2 Docs: Make a minor adjustment to the description syntax for the optional $comment argument in the DocBlock for comment_link(), introduced in [34071].
See #33638. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 11:02:24 +00:00
Drew Jaynes
3c73b53f66 Docs: Remove markdown from the DocBlock summary for WP_List_Table::get_primary_column(), introduced in [34166].
The PHP inline documentation standards for [https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#summary-formerly-short-description summaries] call for not using an markup or markdown. Also, using the full Class::method() in this context allows for better clarity in what is being referenced.

See #33854. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 10:51:25 +00:00
Drew Jaynes
c52a7d863e Docs: Add a changelog entry for the switch to using wp_get_attachment_url() instead of the guid for determining the header image URL in Custom_Image_Header::step_3().
The change was introduced in [34188].

See #33319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 10:43:25 +00:00
Drew Jaynes
4279a9c39e Docs: Improve documentation for the WP_Object_Cache class.
Spaces out parameter documentation for readability, fixes some minor syntactical issues, and adds some missing `@access` tags or reorders tags according to the PHP docs standards.

Also, documents `&$found`, the fourth parameter for the `get()` method, and adds missing parameter and return descriptions for the `_exists()` utility method.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 10:03:26 +00:00
Drew Jaynes
5172621c1d Docs: Remove an errant change made to a _deprecated_function() call in wp_cache_reset() introduced in [34225].
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 09:42:24 +00:00
Drew Jaynes
4e4737685e Docs: Add more complete documentation for top-level object cache functionality.
Adds some `@see` tags for corresponding `WP_Object_Cache` methods to DocBlocks for top-level functions. Also adds a standard description for the `@global` tags, spacing for parameter docs readability, and finally, properly marks optional parameters as such.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 09:40:25 +00:00
Drew Jaynes
a7ea95f53a Docs: Add documentation for $object_id, the optional second parameter in current_user_can() and WP_User::has_cap(), and the optional third parameter in map_meta_cap().
This change introduces the vernacular of "meta" vs "primitive" capabilities to core docs, and providing examples for each inline and attempts to make it clear that `$object_id` is really only useful if the passed `$capability` is of the meta cap variety.

Props jliman for the initial patch.
Fixes #32694.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 07:36:32 +00:00
Scott Taylor
5920e8eb13 Move WP_Post_Comments_List_Table to its own file.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 06:53:24 +00:00
Sergey Biryukov
61bef72b95 Fix a typo in wptexturize() and wp_replace_in_html_tags() comments.
Props bobbingwide.
See #15694.
Built from https://develop.svn.wordpress.org/trunk@34222


git-svn-id: http://core.svn.wordpress.org/trunk@34186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 05:54:26 +00:00
Aaron Jorbin
1bd52ae1aa Fire Action when mail exception is thrown.
new action is wp_mail_failed which contains a WP_Error object with the phpmailerException code, message and an array with the mail information. Plugins can hook in and log when mails fail to send due to a phpmailer issue.

Props soulseekah
Fixes #18926


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


git-svn-id: http://core.svn.wordpress.org/trunk@34185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 23:51:23 +00:00
Weston Ruter
628caeb487 Customizer: Smooth animation for closing accordions in the available nav menu items pane.
Props tyxla.
Fixes #33360 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 23:40:24 +00:00
Boone Gorges
a7e229637e Improve validation of user_login and user_nicename length.
The `user_login` field only allows 60 characters, and `user_nicename` allows
50. However, there are no protections in the interface, and few in the code,
that prevent the creation of users with values in excess of these limits. Prior
to recent changes in `$wpdb`, users were generally created anyway, MySQL
having performed the necessary truncation. More recently, the `INSERT`s and
`UPDATE`s simply fail, with no real feedback on the nature of the failure.

This changeset addresses the issue in a number of ways:
* On the user-new.php and network/user-new.php panels, don't allow input in excess of the maximum field length.
* In `wp_insert_user()`, throw an error if the value provided for `'user_login'` or `'user_nicename'` exceeds the maximum field length.
* In `wp_insert_user()`, when using `'user_login'` to generate a default value for `'user_nicename'`, ensure that the nicename is properly truncated, even when suffixed for uniqueness (username-2, etc).

Props dipesh.kakadiya, utkarshpatel, tommarshall, boonebgorges.
Fixes #33793.
Built from https://develop.svn.wordpress.org/trunk@34218


git-svn-id: http://core.svn.wordpress.org/trunk@34182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 22:14:26 +00:00
Boone Gorges
cfbd3c2cc0 Omit the ORDER BY clause when updating object term cache.
The `ORDER BY` clause was forcing filesorts on large tables, and is
unnecessary, since term order doesn't matter when updating the cache.

Props mbrandys, wonderboymusic.
Fixes #28922.
Built from https://develop.svn.wordpress.org/trunk@34217


git-svn-id: http://core.svn.wordpress.org/trunk@34181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 20:53:33 +00:00
Scott Taylor
4139daea5e Apply the new 'respond_link' filter in comments_popup_link() if $number is 0 before outputting the URL.
Props joedolson.
Fixes #29454.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 20:46:35 +00:00
Scott Taylor
8573a86def In WP::parse_request(), don't add query vars of non-viewable post types to WP::public_query_vars. In register_post_type(), don't add query vars of non-viewable post types to WP::public_query_vars.
In `_unregister_post_type()` (unit tests), don't add query vars of non-viewable post types to `WP::public_query_vars`.

Adds unit test.

Fixes #30018.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 18:54:30 +00:00
Scott Taylor
d5e02c6129 After [34188], fix unit test for image header.
See #33319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 18:44:48 +00:00
John Blackbourn
a9e5cfddc7 Implement wp_login_url() and wp_registration_url() in places where wp-login.php is currently hard-coded.
See #31495
Props GregLone

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


git-svn-id: http://core.svn.wordpress.org/trunk@34177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 17:11:35 +00:00
Scott Taylor
f5edeb11d0 WP_Comment_Query: add comment__in to allowed values for $orderby.
Adds unit tests.

Fixes #33883.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 16:35:44 +00:00
Scott Taylor
72651400ba Add parent__in and parent__not_in query vars to WP_Comment_Query.
Adds unit tests.

Fixes #33882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 16:23:39 +00:00
Drew Jaynes
0a4bf88cc9 Docs: Update the hook doc summary for the wp_http_ixr_client_headers filter, introduced in [34164].
The idea is to try to reflect what the filterable value is rather than why it's filterable.

Fixes #24598.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 16:16:43 +00:00
Scott Taylor
ff3ae0e747 Don't redirect to the Term list table after submitting the form on the Edit Term page.
Props chiragswadia, UmeshSingla, rhyswynne, afercia.
Fixes #17455.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 15:59:42 +00:00
Scott Taylor
b07b68490f Allow get_lastpostdate(), get_lastpostmodified(), and _get_last_post_time() to accept $post_type and cache separately.
Props _duck, SergeyBiryukov.
See #17455.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 15:25:31 +00:00
Scott Taylor
4a34994e54 Allow wp_page_menu() to accept 'walker', 'before', and 'after' to allow custom markup.
Fixes #11095.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 15:06:30 +00:00
Scott Taylor
57d2420ae5 Similar to #33386, don't use guid when retrieving URL for a cropped header image in the Customizer.
Props polevaultweb.
Fixes #33319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 14:46:32 +00:00
Sergey Biryukov
80165bfc4a Comments: When setting the colspan value for inline edit/reply, make sure it's actually a table and the value is not empty.
Props afercia.
Fixes #33596.
Built from https://develop.svn.wordpress.org/trunk@34179


git-svn-id: http://core.svn.wordpress.org/trunk@34147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 13:44:34 +00:00
John Blackbourn
a5a8ae45a6 Remove outdated references to the preview_post_link filter docs.
See #24345
Props paulwilde

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


git-svn-id: http://core.svn.wordpress.org/trunk@34146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 10:32:31 +00:00
John Blackbourn
541dbb2711 Remove the ability to view the post listing screen and post editing screen for post types with show_ui set to false. It is unexpected and unintended behaviour that this is allowed.
If your plugin or site does rely on this behaviour, the arguments that are passed to `register_post_type()` should be altered so that `show_ui` is `true`, and arguments such as `show_in_menu`, `show_in_nav_menus`, and `show_in_admin_bar` are `false`.

Fixes #33763
Props swissspidy, johnbillion

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


git-svn-id: http://core.svn.wordpress.org/trunk@34145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 10:27:29 +00:00
John Blackbourn
caf90ec1c6 Improve the docblocks for the get_preview_post_link() function and the preview_post_link filter.
See #24345

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


git-svn-id: http://core.svn.wordpress.org/trunk@34144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 08:25:25 +00:00
John Blackbourn
9cd91030a6 Correct the value of the preview query variable added by get_preview_post_link().
See #24345
Props kitchin

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


git-svn-id: http://core.svn.wordpress.org/trunk@34143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 08:16:24 +00:00
John Blackbourn
fdb8400379 Place the filter docblock for http_api_transports immediately above the filter.
See #33413
Props dd32

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


git-svn-id: http://core.svn.wordpress.org/trunk@34142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 08:12:25 +00:00
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