Boone Gorges
eaaabd4105
Send comment approval notification to post author via hook.
...
This is part of the project of #33587 .
Moving this particular message to the
'wp_set_comment_status' action has the added bonus that the notification is
sent after the comment status has been updated in the database. Previously, a
database error could lead to a case where an approval notification is sent,
but the comment status change fails for some reason.
Props mrmist, NickDuncan.
Fixes #14078 .
Built from https://develop.svn.wordpress.org/trunk@34537
git-svn-id: http://core.svn.wordpress.org/trunk@34501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 05:37:25 +00:00
Boone Gorges
cb586896c6
Introduce 'duplicate_comment_id' filter.
...
`wp_allow_comment()` disallows a comment if it matches a comment on the same
post with the same content, author email, and parent. This new filter allows
developers to circumvent or modify this logic, making the duplicate check
more or less lenient, as they see fit.
Fixes #9775 .
Built from https://develop.svn.wordpress.org/trunk@34536
git-svn-id: http://core.svn.wordpress.org/trunk@34500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 05:23:28 +00:00
Boone Gorges
e2c57a9451
Use WP_Comment_Query
in get_page_of_comment()
.
...
This change allows `get_page_of_comment()` to use `WP_Comment_Query`'s native
caching mechanisms.
Props boonebgorges, Viper007Bond, wmertens, jeremyfelt.
Fixes #11334 .
Built from https://develop.svn.wordpress.org/trunk@34535
git-svn-id: http://core.svn.wordpress.org/trunk@34499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 05:11:25 +00:00
Boone Gorges
fd946a9b5a
Pinking shears.
...
Built from https://develop.svn.wordpress.org/trunk@34534
git-svn-id: http://core.svn.wordpress.org/trunk@34498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 04:44:25 +00:00
Boone Gorges
2370a81286
Allow metadata to be attached to comment at time of creation.
...
The new `$comment_meta` parameter of `wp_insert_comment()` allows an array of
key/value pairs to be passed when creating a comment. These pairs are then
stored as commentmeta when the comment has been created.
Props tellyworth, wonderboymusic.
Fixes #12431 .
Built from https://develop.svn.wordpress.org/trunk@34533
git-svn-id: http://core.svn.wordpress.org/trunk@34497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 04:41:25 +00:00
Boone Gorges
7c0ff60cb8
After [34529], fix multisite site creation test.
...
The test `Tests_Multisite_Site::test_created_site_details()` checks for tables
that should be empty on a newly created MS site. `termmeta` is now one of those
tables.
See #10142 .
Built from https://develop.svn.wordpress.org/trunk@34532
git-svn-id: http://core.svn.wordpress.org/trunk@34496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 04:32:27 +00:00
Boone Gorges
37e4c2dbac
Introduce 'paged' parameter for WP_User_Query
.
...
This is an alternative to using 'offset', and manually calculating pagination.
Note that 'paged' works only in conjunction with 'number', the latter of which
provides the per-page value.
Props sebastian.pisula.
Fixes #25145 .
Built from https://develop.svn.wordpress.org/trunk@34531
git-svn-id: http://core.svn.wordpress.org/trunk@34495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 04:26:29 +00:00
Boone Gorges
563d70aa0d
After [34529], normalize documentation for get_terms()
and wp_get_object_terms()
.
...
See #10142 .
Built from https://develop.svn.wordpress.org/trunk@34530
git-svn-id: http://core.svn.wordpress.org/trunk@34494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 04:05:24 +00:00
Boone Gorges
8b4a5d1ec0
Introduce metadata for taxonomy terms.
...
Adds a new table to the database schema (`wp_termmeta`), and a set of
`*_term_meta()` API functions. `get_terms()` and `wp_get_object_terms()`
now also support 'meta_query' parameters, with syntax identical to other
uses of `WP_Meta_Query`.
When fetching terms via `get_terms()` or `wp_get_object_terms()`, metadata for
matched terms is preloaded into the cache by default. Disable this behavior
by setting the new `$update_term_meta_cache` paramater to `false`.
To maximize performance, within `WP_Query` loops, the termmeta cache is *not*
primed by default. Instead, we use a lazy-loading technique: metadata for all
terms belonging to posts in the loop is loaded into the cache the first time
that `get_term_meta()` is called within the loop.
Props boonebgorges, sirzooro.
See #10142 .
Built from https://develop.svn.wordpress.org/trunk@34529
git-svn-id: http://core.svn.wordpress.org/trunk@34493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 03:59:27 +00:00
Scott Taylor
80974b0db6
Links: in get_adjacent_post()
, add a "get_{$adjacent}_post_excluded_terms"
filter.
...
Props rmccue, Japh, MikeHansenMe.
Fixes #9571 .
Built from https://develop.svn.wordpress.org/trunk@34528
git-svn-id: http://core.svn.wordpress.org/trunk@34492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 02:38:25 +00:00
Scott Taylor
e87150fc06
Comments List Table: after [34179], scope the <th>
s and <td>
s as direct descendants of their parent row.
...
Fixes #33943 .
Built from https://develop.svn.wordpress.org/trunk@34527
git-svn-id: http://core.svn.wordpress.org/trunk@34491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 02:21:26 +00:00
John Blackbourn
b27d9015e1
Update the oEmbed endpoint URL for Photobucket.
...
Fixes #33783
Built from https://develop.svn.wordpress.org/trunk@34526
git-svn-id: http://core.svn.wordpress.org/trunk@34490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 22:03:25 +00:00
Scott Taylor
498b2d7e33
Comments: In comment_form()
, move the comment textarea to the top for logged-out users when replying, improves keyboard/focus navigation.
...
Rehabilitate errant tabbing and extra unnecessary `<?php ?>` toggling.
Props afercia, adamsilverstein.
Fixes #29974 .
Built from https://develop.svn.wordpress.org/trunk@34525
git-svn-id: http://core.svn.wordpress.org/trunk@34489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 22:00:28 +00:00
Scott Taylor
59279c5f8b
Comments: In get_comment_statuses()
, also return trash
.
...
XML-RPC: In `wp_xmlrpc_server::wp_editComment()`, allow comments to be trashed.
Introduce unit tests for `wp_editComment` in `xmlrpc/*` #NeverForget
Props tyxla, wonderboymusic.
Fixes #30965 .
Built from https://develop.svn.wordpress.org/trunk@34524
git-svn-id: http://core.svn.wordpress.org/trunk@34488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 21:48:27 +00:00
Scott Taylor
2c23ca7411
Comments: in comment_form()
, add args for cancel_reply_before
and cancel_reply_after
to eradicate remaining hard-coded HTML bits.
...
Props MikeHansenMe.
Fixes #23797 .
Built from https://develop.svn.wordpress.org/trunk@34523
git-svn-id: http://core.svn.wordpress.org/trunk@34487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 21:33:26 +00:00
Scott Taylor
223a2d0f7b
Comments: in check_comment_flood_db()
, don't throttle moderators. If the commenter is logged in, check against their user_id
instead of comment_author_IP
.
...
Throwback: "If you can edit comments on the post, 'Slow down Cowboy' shouldn't kick in."
Props garyc40, wonderboymusic.
Fixes #16219 .
Built from https://develop.svn.wordpress.org/trunk@34522
git-svn-id: http://core.svn.wordpress.org/trunk@34486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 21:22:25 +00:00
Dominik Schilling
df3098f36d
Plugins: Don't use _n()
for singular/plural strings which have no placeholder for a number.
...
Fixes #33239 .
See #28502 .
Built from https://develop.svn.wordpress.org/trunk@34521
git-svn-id: http://core.svn.wordpress.org/trunk@34485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 21:07:25 +00:00
Scott Taylor
169db9dbb1
Comments: add a 'comment_excerpt_length'
filter to get_comment_excerpt()
.
...
Create the first ever unit tests for `get_comment_excerpt()`.
Props dannydehaan, wonderboymusic.
Fixes #27526 .
Built from https://develop.svn.wordpress.org/trunk@34520
git-svn-id: http://core.svn.wordpress.org/trunk@34484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 21:05:25 +00:00
John Blackbourn
92fb281b71
Use WP_TESTS_DOMAIN
where it should be used in tests in place of hard-coded uses of example.org
.
...
Also corrects a test value in the data provider for `Tests_Sanitize_Option::test_sanitize_option()` which was only consequentially passing.
Fixes #34000
Built from https://develop.svn.wordpress.org/trunk@34519
git-svn-id: http://core.svn.wordpress.org/trunk@34483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 21:02:26 +00:00
John Blackbourn
ee04cc0638
Another missed file from [34172].
...
See #33877
Built from https://develop.svn.wordpress.org/trunk@34518
git-svn-id: http://core.svn.wordpress.org/trunk@34482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 20:33:26 +00:00
Scott Taylor
44822831fe
Comments List Table JS: move the dynamic count functions into closure scope so that setCommentsList
AND commentReply
can access them. Update counts when replying inline.
...
Fixes #33403 .
Built from https://develop.svn.wordpress.org/trunk@34517
git-svn-id: http://core.svn.wordpress.org/trunk@34481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 20:16:49 +00:00
John Blackbourn
bef8977ea1
Add a @since
entry for the implementation of the $public
argument in register_taxonomy()
.
...
See #21949
Built from https://develop.svn.wordpress.org/trunk@34516
git-svn-id: http://core.svn.wordpress.org/trunk@34480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 20:16:26 +00:00
Scott Taylor
79974ac413
Edit Post: in the logic determining whether to display the Comments meta box, check for the current post status in get_post_stati( array( 'public' => true ) )
instead of just checking publish
and private
. Ensure that private
is checked in both instances.
...
Props Thaicloud, wonderboymusic.
Fixes #24486 .
Built from https://develop.svn.wordpress.org/trunk@34515
git-svn-id: http://core.svn.wordpress.org/trunk@34479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 20:02:24 +00:00
Scott Taylor
bf04b211a4
Widgets: use input[type="number"]
for the number
prop in the Recent Posts and Recent Comments widget forms.
...
Props helen, obenland, mordauk.
Fixes #22965 .
Built from https://develop.svn.wordpress.org/trunk@34514
git-svn-id: http://core.svn.wordpress.org/trunk@34478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 19:53:26 +00:00
John Blackbourn
949b6ee1df
Convert the $args
passed to register_post_type()
into an array before passing them to the new register_post_type_args
filter.
...
Fixes #17447
Built from https://develop.svn.wordpress.org/trunk@34513
git-svn-id: http://core.svn.wordpress.org/trunk@34477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 19:39:25 +00:00
Drew Jaynes
f84c653fad
Docs: Clarify the summary and optional $query
parameter description for remove_query_arg()
.
...
Props johnbillion.
Fixes #33912 .
Built from https://develop.svn.wordpress.org/trunk@34512
git-svn-id: http://core.svn.wordpress.org/trunk@34476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 19:34:24 +00:00
Drew Jaynes
92574015aa
Docs: Overhaul the DocBlock for add_query_arg()
to attempt to better explain the various call signatures it accepts.
...
Also adds a couple of in-DocBlock examples illustrating single key and value, and associative array usage. Retains the note about the unescaped return value.
Props johnbillion.
See #33912 .
Built from https://develop.svn.wordpress.org/trunk@34511
git-svn-id: http://core.svn.wordpress.org/trunk@34475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 19:32:24 +00:00
Drew Jaynes
a6c8b7aafa
Docs: Convert the $args
parameter description in the register_taxonomy()
DocBlock to a hash notation.
...
Also standardizes the DocBlock summary.
Props johnbillion.
Fixes #33991 .
Built from https://develop.svn.wordpress.org/trunk@34510
git-svn-id: http://core.svn.wordpress.org/trunk@34474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 19:12:26 +00:00
Drew Jaynes
4c7a4bfb25
Docs: Improve the summary and description for the pre_http_request
filter docs to better illustrate expected values.
...
The filter explicitly expects one of three passed value types:
* An array containing 'headers', 'body', 'response', 'cookies', and 'filename' elements
* A `WP_Error` instance
* Boolean false (to avoid short-circuiting the response)
Props johnbillion.
Fixes #33995 .
Built from https://develop.svn.wordpress.org/trunk@34509
git-svn-id: http://core.svn.wordpress.org/trunk@34473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 18:52:25 +00:00
Andrea Fercia
6fdd384fe0
Comments List Table: fix the translators comment for all count after [34506].
...
See #17275 .
Built from https://develop.svn.wordpress.org/trunk@34508
git-svn-id: http://core.svn.wordpress.org/trunk@34472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 18:40:24 +00:00
John Blackbourn
cb740147be
Add $depth
as a parameter in the nav_menu_item_args
filter.
...
Fixes #29417
Built from https://develop.svn.wordpress.org/trunk@34507
git-svn-id: http://core.svn.wordpress.org/trunk@34471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:59:24 +00:00
Scott Taylor
4671e03766
Comments List Table: include count for "All". Dynamically update.
...
Fixes #17275 .
Built from https://develop.svn.wordpress.org/trunk@34506
git-svn-id: http://core.svn.wordpress.org/trunk@34470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:57:25 +00:00
John Blackbourn
41edf2bc22
Correctly present an error to the user if the nickname field is empty when updating a user profile. It's strange that this field is required, but it is, so be it.
...
Fixes #33310
Props prasad-nevase, metodiew
Built from https://develop.svn.wordpress.org/trunk@34505
git-svn-id: http://core.svn.wordpress.org/trunk@34469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:49:25 +00:00
Scott Taylor
bc5eb3a623
Comments: add date
column to WP_Comments_List_Table
to allow sorting and to break out the date/time from the comment content column.
...
Props jshreve.
Fixes #15520 .
Built from https://develop.svn.wordpress.org/trunk@34504
git-svn-id: http://core.svn.wordpress.org/trunk@34468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:27:26 +00:00
Scott Taylor
595bad9f37
Comments: In comments_template()
, set $wp_query->comments_by_type
to empty array if not separating comments. The value becomes stale otherwise. Edge case.
...
Props jakub.tyrcha.
Fixes #14809 .
Built from https://develop.svn.wordpress.org/trunk@34503
git-svn-id: http://core.svn.wordpress.org/trunk@34467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 16:31:24 +00:00
Drew Jaynes
b818747870
Docs: Add more explicit optional parameter types and return descriptions in the DocBlocks for is_page()
, is_single()
, is_singular()
.
...
Also adds explicit types and return descriptions to the corresponding `WP_Query` methods: `WP_Query::is_page()`, `WP_Query::is_single()`, and `WP_Query::is_singular()`.
Props Shelob9 for the initial patch.
Fixes #33907 .
Built from https://develop.svn.wordpress.org/trunk@34502
git-svn-id: http://core.svn.wordpress.org/trunk@34466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 16:18:24 +00:00
Dominik Schilling
38b561e8df
Twenty Fifteen: Add a missing comma in rtl.css.
...
Props Toro_Unit.
Fixes #33985 .
Built from https://develop.svn.wordpress.org/trunk@34501
git-svn-id: http://core.svn.wordpress.org/trunk@34465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 16:03:24 +00:00
Scott Taylor
5b9af35c4c
Comments: update Comment counts dynamically in the Right Now widget based on moderation actions in the Activity widget.
...
Fixes #10422 .
Built from https://develop.svn.wordpress.org/trunk@34500
git-svn-id: http://core.svn.wordpress.org/trunk@34464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 15:53:25 +00:00
Drew Jaynes
9dba452afc
Docs: Standardize and clarify class DocBlocks for all of the Upgrade API classes.
...
Standardizes summaries and tags for the following classes:
* `WP_Upgrader`
* `Plugin_Upgrader`
* `Theme_Upgrader`
* `Language_Pack_Upgrader`
* `Core_Upgrader`
* `File_Upload_Upgrader`
* `WP_Automatic_Updater`
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34499
git-svn-id: http://core.svn.wordpress.org/trunk@34463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:54:25 +00:00
Drew Jaynes
dae68e1485
Docs: Clarify the file header for wp-admin/includes/class-wp-upgrader.php.
...
See #33701 .
Built from https://develop.svn.wordpress.org/trunk@34498
git-svn-id: http://core.svn.wordpress.org/trunk@34462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:44:25 +00:00
Drew Jaynes
8c0a805273
Docs: Mark the optional $upgrader
parameter as such and add a description in the DocBlock for Language_Pack_Upgrader::async_upgrade()
.
...
See [32655].
See #30989 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34497
git-svn-id: http://core.svn.wordpress.org/trunk@34461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:35:25 +00:00
Scott Taylor
9405b8b10e
Canonical/Rewrite: After [34492], fix rel="canonical"
URLs for paginated posts.
...
Props wonderboymusic, joostdevalk.
See #11694 .
Built from https://develop.svn.wordpress.org/trunk@34496
git-svn-id: http://core.svn.wordpress.org/trunk@34460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:30:24 +00:00
Drew Jaynes
0fc9bed46e
Docs: Add a summary, version, and parameter and return descriptions to the DocBlock for WP_Filesystem_ftpsockets::get_contents()
.
...
Also reverses the return types as `string` is expected, `false` is the outlier.
See [30978].
See #30989 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34495
git-svn-id: http://core.svn.wordpress.org/trunk@34459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:22:24 +00:00
Scott Taylor
b45178379b
After [34492], no need to import the global instance when we are, in fact, currently, that instance.
...
See #11694 .
Built from https://develop.svn.wordpress.org/trunk@34494
git-svn-id: http://core.svn.wordpress.org/trunk@34458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:20:24 +00:00
Drew Jaynes
fbb6ef1922
Docs: Add a summary, version, and parameter and return descriptions to the DocBlock for WP_Filesystem_FTPext::get_contents()
.
...
Also reverses the return types as `string` is expected, `false` is the outlier.
See [30978].
See #30989 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34493
git-svn-id: http://core.svn.wordpress.org/trunk@34457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:11:26 +00:00
Scott Taylor
175d476b0e
Canonical/Rewrite: sanity check posts that are paged with <!--nextpage-->
. Page numbers past the max number of pages are returning the last page of content and causing infinite duplicate content.
...
Awesome rewrite bug: the `page` query var was being set to `'/4'` in `$wp`. When cast to `int`, it returns `0` (Bless you, PHP). `WP_Query` calls `trim( $page, '/' )` when setting its own query var. The few places that were checking `page` before posts were queried now have sanity checks, so that these changes work without flushing rewrites.
Adds/updates unit tests.
Props wonderboymusic, dd32.
See #11694 .
Built from https://develop.svn.wordpress.org/trunk@34492
git-svn-id: http://core.svn.wordpress.org/trunk@34456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:04:24 +00:00
Drew Jaynes
f1532ccde8
Docs: Add a summary, version, and @access
tag to the property DocBlock for Custom_Image_Header->updated
.
...
See [14907] for where the property was initially introduced.
See [30187] for where the property was actually declared.
Props brentvr.
See #30224 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34491
git-svn-id: http://core.svn.wordpress.org/trunk@34455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 13:39:25 +00:00
Drew Jaynes
caf3df03bc
Docs: Add a summary, version, and @access
tag to the property DocBlock for Custom_Background->updated
.
...
See [13765] for where the property was initially introduced.
See [30186] for where the property was actually declared.
Props brentvr.
See #30224 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34490
git-svn-id: http://core.svn.wordpress.org/trunk@34454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 13:34:24 +00:00
Drew Jaynes
de5e9d01a9
Docs: Add a summary, version, and @access
tag to the property DocBlock for WP_Locale->number_format
.
...
See [5308] for where the property was initially introduced.
See [31083] for where the property was actually declared.
Props brentvr.
See #30224 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34489
git-svn-id: http://core.svn.wordpress.org/trunk@34453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 13:26:24 +00:00
Dominik Schilling
97146ee2cb
Customizer: Update tests for [34487].
...
Fixes #33634 .
Built from https://develop.svn.wordpress.org/trunk@34488
git-svn-id: http://core.svn.wordpress.org/trunk@34452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 11:32:26 +00:00