Sergey Biryukov
d262ebca0a
Docs: Synchronize the $timezone
parameter description between get_lastpostdate()
, get_lastpostmodified()
, and _get_last_post_time()
.
...
See #17455 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34240 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 15:28:12 +00:00
Sergey Biryukov
9ab1dfd03e
Docs: Fix some syntactical issues with the DocBlock for wp_mail_failed
action, introduced in [34221].
...
Fixes #18926 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34239 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 15:12:42 +00:00
Sergey Biryukov
1d4b8ffd1d
Docs: Expand the DocBlock for the WP_Theme::get_edit_link()
method, introduced in [34084].
...
Fixes #32376 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34238 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 15:00:04 +00:00
Drew Jaynes
2b6dc75396
Docs: Add changelog entries for parameters where WP_Comment
object support was added in [33961].
...
See #33638 . See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34237 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 13:51:13 +00:00
Drew Jaynes
c2d0a83330
Docs: Fix some syntactical issues with the DocBlock for the WP_Theme->update
property, introduced in [33957].
...
Adds an `@since`.
See #33491 . See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34236 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 13:28:41 +00:00
Drew Jaynes
bb2fc0933d
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34235 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 13:25:05 +00:00
Drew Jaynes
7682e433fc
Docs: Put "it's" in its place (again).
...
Props kitchin.
Fixes #33894 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34234 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 12:45:51 +00:00
Sergey Biryukov
c57efab4f4
Add a comment to strings where the ellipsis cannot be used due to json_encode()
, placeholders, or external dependencies.
...
Fixes #32875 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34233 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 11:58:41 +00:00
Sergey Biryukov
04c1c825e9
Reset Password: Move <div>
out of <p>
in wp-login.php
.
...
Props ldinclaux.
Fixes #33892 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34232 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 11:45:09 +00:00
Sergey Biryukov
557d160ca1
Comments: Fix a fatal error in Comments meta box after [34223].
...
Props tyxla.
Fixes #33893 . See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34231 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 11:36:35 +00:00
Drew Jaynes
fea6142412
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34230 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 11:01:50 +00:00
Drew Jaynes
3b3a034c11
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34229 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 10:50:21 +00:00
Drew Jaynes
f83abcbf3e
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34228 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 10:42:08 +00:00
Drew Jaynes
ff35e34fad
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34227 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 10:02:20 +00:00
Drew Jaynes
1075ec80b8
Docs: Remove an errant change made to a _deprecated_function()
call in wp_cache_reset()
introduced in [34225].
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34226 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 09:41:51 +00:00
Drew Jaynes
741bd4440c
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34225 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 09:39:33 +00:00
Drew Jaynes
f2eb739ea6
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34224 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 07:35:37 +00:00
Scott Taylor
05cd237d5e
Move WP_Post_Comments_List_Table
to its own file.
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34223 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 06:52:35 +00:00
Sergey Biryukov
7e706c285b
Fix a typo in wptexturize()
and wp_replace_in_html_tags()
comments.
...
Props bobbingwide.
See #15694 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34222 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 05:53:09 +00:00
Aaron Jorbin
bf5f316668
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
git-svn-id: https://develop.svn.wordpress.org/trunk@34221 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 23:50:30 +00:00
Weston Ruter
1975b0a084
Customizer: Smooth animation for closing accordions in the available nav menu items pane.
...
Props tyxla.
Fixes #33360 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@34219 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 23:39:23 +00:00
Boone Gorges
0adb6877b2
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34218 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 22:13:51 +00:00
Boone Gorges
2d59d18e3a
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34217 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 20:52:40 +00:00
Scott Taylor
e05586646a
Apply the new 'respond_link'
filter in comments_popup_link()
if $number
is 0
before outputting the URL.
...
Props joedolson.
Fixes #29454 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34216 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 20:45:32 +00:00
Scott Taylor
28426c041c
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34215 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 18:53:12 +00:00
Scott Taylor
6493d211d2
After [34188], fix unit test for image header.
...
See #33319 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34214 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 18:43:51 +00:00
John Blackbourn
1a352d56f9
Implement wp_login_url()
and wp_registration_url()
in places where wp-login.php
is currently hard-coded.
...
See #31495
Props GregLone
git-svn-id: https://develop.svn.wordpress.org/trunk@34213 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 17:10:24 +00:00
Scott Taylor
7b93c40830
WP_Comment_Query
: add comment__in
to allowed values for $orderby
.
...
Adds unit tests.
Fixes #33883 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34212 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 16:34:14 +00:00
Scott Taylor
72bc9d3227
Add parent__in
and parent__not_in
query vars to WP_Comment_Query
.
...
Adds unit tests.
Fixes #33882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34205 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 16:22:34 +00:00
Drew Jaynes
f48d395ffb
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34203 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 16:15:39 +00:00
wonderboymusic
2a1ee1a235
Don't redirect to the Term list table after submitting the form on the Edit Term page.
...
Props chiragswadia, UmeshSingla, rhyswynne, afercia.
Fixes #17455 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34202 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 15:58:04 +00:00
Scott Taylor
8fc44f8c39
Allow get_lastpostdate()
, get_lastpostmodified()
, and _get_last_post_time()
to accept $post_type
and cache separately.
...
Props _duck, SergeyBiryukov.
See #17455 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34201 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 15:24:04 +00:00
Scott Taylor
b5b07ca329
Allow wp_page_menu()
to accept 'walker'
, 'before'
, and 'after'
to allow custom markup.
...
Fixes #11095 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34200 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 15:05:34 +00:00
Scott Taylor
acbeef27b9
Similar to #33386 , don't use guid
when retrieving URL for a cropped header image in the Customizer.
...
Props polevaultweb.
Fixes #33319 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34188 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 14:45:59 +00:00
Sergey Biryukov
87d6be5991
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34179 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 13:43:28 +00:00
John Blackbourn
b8349f8222
Remove outdated references to the preview_post_link
filter docs.
...
See #24345
Props paulwilde
git-svn-id: https://develop.svn.wordpress.org/trunk@34178 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 10:31:40 +00:00
John Blackbourn
a923d36085
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
git-svn-id: https://develop.svn.wordpress.org/trunk@34177 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 10:26:22 +00:00
John Blackbourn
9b836740c3
Improve the docblocks for the get_preview_post_link()
function and the preview_post_link
filter.
...
See #24345
git-svn-id: https://develop.svn.wordpress.org/trunk@34176 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:24:54 +00:00
John Blackbourn
47a66713ae
Correct the value of the preview
query variable added by get_preview_post_link()
.
...
See #24345
Props kitchin
git-svn-id: https://develop.svn.wordpress.org/trunk@34175 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:15:22 +00:00
John Blackbourn
c0c2a76778
Place the filter docblock for http_api_transports
immediately above the filter.
...
See #33413
Props dd32
git-svn-id: https://develop.svn.wordpress.org/trunk@34174 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:11:11 +00:00
John Blackbourn
0402bac392
Missed files from [34172].
...
See #33877
git-svn-id: https://develop.svn.wordpress.org/trunk@34173 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:08:15 +00:00
John Blackbourn
c29412abf9
Initialise $_SERVER[ 'REMOTE_ADDR' ]
during the test bootstrap so individual tests need not.
...
Fixes #33877
Fixes #25162
git-svn-id: https://develop.svn.wordpress.org/trunk@34172 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:04:33 +00:00
Scott Taylor
c95d6b3ec8
Use get_attached_file()
in attachment_submitbox_metadata()
.
...
Props kitchin.
Fixes #33386 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34171 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:17:38 +00:00
Scott Taylor
c0d850878a
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34170 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:14:23 +00:00
Scott Taylor
ac610c191b
Move WP_Screen
to its own file.
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34169 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:07:14 +00:00
Scott Taylor
26ab36f909
Move the admin Nav Menu Walker subclasses into their own files. Load in nav-menu.php
to remain BC.
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34168 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:01:30 +00:00
Scott Taylor
c702a71ad1
Update post thumbnail functions to allow a WP_Post
to be passed.
...
Adds unit tests.
Props swissspidy, Rahe.
Fixes #33723 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34167 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 03:45:23 +00:00
Scott Taylor
1a537a4f6d
Add a doc block to WP_List_Table::get_primary_column()
.
...
Fixes #33854 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34166 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 03:34:44 +00:00
Scott Taylor
8df7bd75b6
Ensure that widget carets close when dragging an expanded widget.
...
Props sdavis2702, mindctrl.
Fixes #33578 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34165 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 03:09:35 +00:00
Scott Taylor
030747e429
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34164 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 02:53:18 +00:00