Commit Graph

514 Commits

Author SHA1 Message Date
Drew Jaynes
e41a0998e6 Docs: Add an internal note to the DocBlock for comment_form_title() explaining restoration of the $comment global.
See [36512]. See #35624.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 19:15:28 +00:00
Boone Gorges
1877b8c726 Set the $comment global in comment_form_title().
In [33963], `comment_form_title()` was refactored so that it no longer made
reference to the `$comment` global. This broke some functionality within the
comment form, as certain template would no longer be able to access the
"current" comment.

Props d4z_c0nf, WisdmLabs, boonebgorges.
Fixes #35624.
Built from https://develop.svn.wordpress.org/trunk@36512


git-svn-id: http://core.svn.wordpress.org/trunk@36479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 04:10:25 +00:00
Drew Jaynes
b45a6228d0 Docs: Add a changelog entry for the introduction of maxlength character limits for the 'author', 'email', and 'url' fields in comment_form().
Introduced in [36272].

See #10377. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 08:05:27 +00:00
Rachel Baker
2573fa7ab8 Comments: Add back $req variable in comments_template().
The variables in `comments_template()` should never be assumed to be unused. This function includes the `comments.php` template file from the active theme or falls back to `theme-compat/comments.php`. This is why including a file within a function only brings pain and sorrow.

Reverts r36322.

See #35473.
Built from https://develop.svn.wordpress.org/trunk@36425


git-svn-id: http://core.svn.wordpress.org/trunk@36392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 22:13:26 +00:00
Eric Lewis
22467e840f Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:35:27 +00:00
Rachel Baker
f956379447 Comments: Remove unused $default_comments_page variable in get_comment_link().
Left in r34735, fetches the `default_comments_page` option twice since this variable is unused. 

See #34073 and #35511.

Props Latz.
Built from https://develop.svn.wordpress.org/trunk@36343


git-svn-id: http://core.svn.wordpress.org/trunk@36310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 16:35:28 +00:00
Boone Gorges
d2dabdecf6 Respect custom pagination params when using wp_list_comments() in a query loop.
[36157] fixed a problem, introduced in 4.4, that caused custom pagination
parameters passed to `wp_list_comments()`. However, the fix introduced in that
changeset was limited to the `is_singular()` context, so that the bug remained
when `wp_list_comments()` is used within a non-singular `WP_Query` loop. We
fix this by removing the `is_singular()` check and using the more general
`get_the_ID()` to identify the correct post_id to use for the secondary
comment query.

Fixes #35402.
Built from https://develop.svn.wordpress.org/trunk@36324


git-svn-id: http://core.svn.wordpress.org/trunk@36291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:48:25 +00:00
Pascal Birchler
e85f75f23f Comments: Remove unneeded $req variable in comments_template().
Props Latz.
Fixes #35473.
Built from https://develop.svn.wordpress.org/trunk@36322


git-svn-id: http://core.svn.wordpress.org/trunk@36289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:33:27 +00:00
Boone Gorges
4ac35f5713 Always respect $comments array passed to wp_list_comments().
[36157] fixed a bug whereby `wp_list_comments()` would not properly recognize
custom pagination arguments. See #35175. However, it inadvertently introduced
a bug that caused any `$comments` array explicitly passed to the function to be
ignored, when that array was accompanied by pagination arguments that differ
from those in `$wp_query`. We address this bug by moving the logic introduced
in [36157] inside a block that only fires when no `$comments` array has been
provided to the function.

Props ivankristianto.
Fixes #35356.
Built from https://develop.svn.wordpress.org/trunk@36276


git-svn-id: http://core.svn.wordpress.org/trunk@36243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 03:27:27 +00:00
Boone Gorges
294a164b15 Ignore hierarchy in pagination calculation when comment threading is disabled.
In order to calculate comment pagination when newest comments are displayed
first, `comments_template()` must perform a separate query to determine the
total number of paginating comments available on a post. See [34729], #8071,
pagination calculation - can be defined as a top-level comment, or a comment
with `parent=0`. However, when comment threading is disabled, yet comments
exist in the database that have parents, all comments - even those with a
parent - are "paginating". (This typically happens when comments threading was
once enabled, but has since been turned off.) As such, the total-paginating-
comments query should only be limited to top-level comments when
'thread_comments' is disabled.

Props jmdodd.
Fixes #35419.
Built from https://develop.svn.wordpress.org/trunk@36275


git-svn-id: http://core.svn.wordpress.org/trunk@36242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 03:13:25 +00:00
Rachel Baker
87e7b4455d Comments: Restrict the maximum characters for input fields within the comments template.
Added hardcoded maxlength attributes on the author, author_email, author_url, and comment_field input markup. These can be modified via the comment_form_defaults filter. Added logic in wp_handle_comment_submission() to return a WP_Error when the comment_author, comment_author_url, or comment_content values exceed the max length of their columns. Introduces wp_get_comment_column_max_length() which returns the max column length for a given column name, and is filterable. Unit tests included for the error conditions in wp_handle_comment_submission()

Fixes #10377.

Props westonruter rachelbaker.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 01:25:26 +00:00
Boone Gorges
2c96c289cf Add missing param to 'comments_template_query_args'.
As introduced in [36235].

Props birgire.
See #34442.
Built from https://develop.svn.wordpress.org/trunk@36256


git-svn-id: http://core.svn.wordpress.org/trunk@36223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-11 02:28:27 +00:00
Boone Gorges
72265e4a98 Introduce comments_template_query_args filter.
This new filter gives developers a way to target the arguments used for comment
queries specifically when populating the main comment template.

Props birgire.
Fixes #34442.
Built from https://develop.svn.wordpress.org/trunk@36235


git-svn-id: http://core.svn.wordpress.org/trunk@36202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-09 04:44:26 +00:00
Boone Gorges
13629bf5d0 In comments_template(), don't run hierarchical queries if comment threading is disabled.
When hierarchical=true, `WP_Comment_Query` will always fetch comments according
to the comment hierarchy, even if 'thread_comments' is disabled for the site.
This can cause problems when comment threading is disabled after threaded
comments have been recorded on the site; comments will no longer be returned in
a strictly chronological order.

We address the issue by refraining from querying hierarchically when comment
threading is disabled.

Props jmdodd.
Fixes #35378.
Built from https://develop.svn.wordpress.org/trunk@36226


git-svn-id: http://core.svn.wordpress.org/trunk@36193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-08 22:17:26 +00:00
Boone Gorges
31ef230595 Ensure that non-default pagination values work in wp_list_comments().
Prior to 4.4, it was possible to pass 'page' and 'per_page' values to
`wp_list_comments()` that do not match the corresponding global query vars.
This ability was lost in 4.4 with the refactor of how `comments_template()`
queries for comments; when the main comment query started fetching only the
comments that ought to appear on a page, instead of all of a post's comments,
it became impossible for the comment walker to select comments corresponding to
custom pagination parameters. See #8071.

We restore the previous behavior by (a) detecting when a 'page' or 'per_page'
parameter has been passed to `wp_list_comments()` that does not match the
corresponding query vars (so that the desired comments will not be found in
`$wp_query`), and if so, then (b) querying for all of the post's comments and
passing them to the comment walker for pagination, as was the case before 4.4.

Props boonebgorges, smerriman.
Fixes #35175.
Built from https://develop.svn.wordpress.org/trunk@36157


git-svn-id: http://core.svn.wordpress.org/trunk@36123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-03 02:03:28 +00:00
John Blackbourn
0003a004db Docs: Miscellaneous docblock code quality tweaks.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:53:26 +00:00
Boone Gorges
26caa329f2 Respect approval status when determining comment page count in comments_template().
Since 4.4, when fetching the first page of comments and the 'newest' comments
are set to display first, `comments_template()` must perform arithmetic to
determine which comments to show. See #8071. This arithmetic requires the
total comment count for the current post, which is calculated with a separate
`WP_Comment_Query`. This secondary comment query did not properly account for
non-approved comment statuses; all unapproved comments should be part of the
comment count for admins, and individual users should have their own
unapproved comments included in the count. As a result, `comments_template()`
was, in some cases, being fooled into thinking that a post had fewer comments
available for pagination than it actually had, which resulted in empty pages
of comments.

We correct this problem by mirroring 'status' and 'include_unapproved' params
of the main comment query within the secondary query used to calculate
pagination.

Fixes #35068.
Built from https://develop.svn.wordpress.org/trunk@36040


git-svn-id: http://core.svn.wordpress.org/trunk@36005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 03:07:32 +00:00
Boone Gorges
3bc0e35684 Omit cpage query var in comment link if comment pagination is disabled.
WP 4.4 changed the way comment pagination is calculated. See #8071. In the
context of `get_comment_link()`, these changes introduced a regression that
causes `cpage` (or its pretty-permalink correlate `comment-page-x`) to appear
in comment links when comment pagination is disabled. The current changeset
fixes the regression.

Fixes #34946.
Built from https://develop.svn.wordpress.org/trunk@35933


git-svn-id: http://core.svn.wordpress.org/trunk@35897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-14 19:46:46 +00:00
Boone Gorges
b6dbe1cea9 Don't use array_merge() when building comment children arrays.
`array_merge()` is much slower than building the combined array using a
`foreach` loop. The performance difference was causing a speed regression with
the `get_children()` functionality introduced in 4.4.

Props rogerhub.
Fixes #35025.
Built from https://develop.svn.wordpress.org/trunk@35931


git-svn-id: http://core.svn.wordpress.org/trunk@35895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-14 19:37:43 +00:00
Drew Jaynes
1ae97a2078 Docs: Update the summary for the comment_form_fields hook docs to explicitly mention inclusion of the textarea element as a filterable element.
Previously [35723]

Props bappidgreat.
Fixes #34973.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 01:07:27 +00:00
John Blackbourn
a027edc277 Comments: The year is 2003. Permalinks are a new thing and everyone's using Blogger. It's a time when opening a modal window in JavaScript to view a section of a website is not a completely weird thing, although many users get annoyed by it. b2 has recently become WordPress, and with it comes a bunch of functionality that will become stale over the next decade, remnants of simpler times.
Twelve years later, after no fewer than three themes have intentionally implemented popup comments in their functionality, before being abandoned for at least the last six years, we've reached a time where we can put this era behind us. A time when we can remove comment popup functionality from WordPress.

If this breaks the internet, I'll eat my hat.

Fixes #28617

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


git-svn-id: http://core.svn.wordpress.org/trunk@35812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-10 03:06:30 +00:00
John Blackbourn
ec24d6e001 In a similar vein to [34133], escape the email address and IP address of comment authors to increase defence in depth.
Built from https://develop.svn.wordpress.org/trunk@35748


git-svn-id: http://core.svn.wordpress.org/trunk@35712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-29 02:43:24 +00:00
Sergey Biryukov
fd9bd77fe5 Comments: In comment_form(), introduce the comment_form_fields filter for comment fields, including the textarea.
Correct the docs for `comment_notes_before` and `comment_notes_after` arguments as well as `comment_form_before_fields` and `comment_form_after_fields` actions to better describe the current behaviour.

Fixes #34731.
Built from https://develop.svn.wordpress.org/trunk@35723


git-svn-id: http://core.svn.wordpress.org/trunk@35687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-20 18:56:27 +00:00
Sergey Biryukov
b5b3b0b913 Remove <code> tag from translatable string in trackback_url().
Add translator commment.

Props ramiy.
Fixes #34573.
Built from https://develop.svn.wordpress.org/trunk@35546


git-svn-id: http://core.svn.wordpress.org/trunk@35510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-05 23:39:25 +00:00
Sergey Biryukov
3caaa702bf Comments: Use _n() in get_comments_number_text() when setting the default string for multiple comments.
Fixes #34593.
Built from https://develop.svn.wordpress.org/trunk@35536


git-svn-id: http://core.svn.wordpress.org/trunk@35500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-05 15:36:28 +00:00
Boone Gorges
3eab09a694 Don't force comment pagination.
[34561] instituted the policy of forcing pagination for comments. This strategy
was intended to avert problems when 'page_comments' is set to 0 - as it is by
default - and the number of comments on a given post rises into the hundreds or
thousands. By forcing pagination in all cases, we ensured that WordPress would
not time out by processing unwieldy numbers of comments on a given pageload.

The strategy proves problematic, however, because comment permalinks are
generated using the page of the comment. Forcing pagination for posts that
were not previously paginated would change the URL of all comments that do not
appear on the default comment page.

This changeset reintroduces the 'page_comments' setting and its corresponding
checkbox on Settings > Discussion. A number of tests, which were written after
[34561], are modified to work now that 'page_comments' will, once again, be
disabled by default.

See #8071.
Built from https://develop.svn.wordpress.org/trunk@35331


git-svn-id: http://core.svn.wordpress.org/trunk@35297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 16:26:42 +00:00
Scott Taylor
00ade45fd1 Docs: some @global object vernaculars should be converted to the actual object type.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 15:45:25 +00:00
Drew Jaynes
5df204fab4 Template: Introduce a new class_form argument in comment_form(), allowing customization of the form class attribute.
The static 'comment-form' class was originally added to `comment_form()` in [24525]. This new argument should provide needed flexibility in styling the comment form further.

Props flixos90.
Fixes #34170. See #23851.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-06 17:17:24 +00:00
Boone Gorges
ca86a8a404 Remove dead code added to get_comment_link() in [34735].
See #34073.
Built from https://develop.svn.wordpress.org/trunk@34792


git-svn-id: http://core.svn.wordpress.org/trunk@34757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 01:27:24 +00:00
Boone Gorges
b23fdba5a2 Ensure that comment permalinks reflect pagination.
After [34561], `wp_list_comments()` no longer passed all of a post's comments
to `Walker_Comments`. As a result, calls to `get_comment_link()` occurring
inside the comment loop had insufficient context to determine the proper
'cpage' value to use when generating comment permalinks. This, in turn, caused
comment permalinks to behave erratically.

The current changeset addresses the problem as follows:

* `get_comment_link()` now accepts a 'cpage' parameter. When present, 'cpage' will be used to build the comment permalink - no automatic calculation will take place.
* When called within the main loop, `wp_list_comments()` calculates the proper 'cpage' value for comments in the loop, and passes it down to `get_comment_link()`.
* `cpage` and `comment-page-x` query vars are generally required in comment permalinks (see #34068), but an exception is made when 'default_comment_page=oldest': the bare post permalink will always be the same as `cpage=1`, so `cpage` is excluded in this case.

Props peterwilsoncc for assiduous spreadsheeting.
Fixes #34073.
Built from https://develop.svn.wordpress.org/trunk@34735


git-svn-id: http://core.svn.wordpress.org/trunk@34699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:13:25 +00:00
Boone Gorges
dd9709d179 Simplify pagination logic in comments_template().
[34561] "fixed" the problem of newest-first comments showing fewer than
'per_page' comments on the post permalink when the total number of comments
was not divisible by 'per_page'. See #29462. But this fix caused numerous
other problems. First, comment pages reported by `get_page_of_comment()`
(which expects comment pages to be filled oldest-first) were no longer correct.
Second, and more seriously, the new logic caused comments to be shifted
between pages, making their permalinks non-permanent.

The current changeset reverts the changed behavior. In order to preserve the
performance improvements introduced in [34561], an additional query must be
performed when 'default_comments_page=newest' and 'cpage=0' (ie, you're viewing
the post permalink). A nice side effect of this revert is that we no longer
need the hacks required to determine proper comment pagination, introduced in
[34561].

See #8071. See #34073.
Built from https://develop.svn.wordpress.org/trunk@34729


git-svn-id: http://core.svn.wordpress.org/trunk@34693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 03:11:30 +00:00
Boone Gorges
5dcced2d13 Use array hash notation for get_comment_link() $args.
See #34068, #34073.
Built from https://develop.svn.wordpress.org/trunk@34716


git-svn-id: http://core.svn.wordpress.org/trunk@34680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:13:25 +00:00
Boone Gorges
654eeb3785 Improve lazyloading of comment meta in WP_Query loops.
Lazy-loading logic is moved to a method on `WP_Query`. This makes it possible
for comment feeds to take advantage of metadata lazyloading, in addition to
comments loaded via `comments_template()`.

This new technique parallels the termmeta lazyloading technique introduced in
[34704].

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


git-svn-id: http://core.svn.wordpress.org/trunk@34675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 01:35:26 +00:00
Boone Gorges
f7f4fb01ab Fix comment_order for single page comment threads.
The old comment pagination logic had a separate block for comment threads that
appeared on a single page. After the refactoring in [34561], all comment
pagination logic is unified.

This change ensures that 'comment_order' is respected in all scenarios.

Fixes #8071.
Built from https://develop.svn.wordpress.org/trunk@34669


git-svn-id: http://core.svn.wordpress.org/trunk@34633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 19:30:26 +00:00
Scott Taylor
fa90b77ba4 Comments: in WP_Comment::get_children(), accept an array so that the values for format, status, hierarchical, and orderby can be passed, instead of just format. The defaults for get_comments() include status = 'all' and orderby = '' - which is no bueno.
For threaded comments, we need comments to be retrieved within bounds, so logged-out users don't see unmoderated comments on the front end, etc.

Updates unit tests.

See #8071.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-26 02:25:26 +00:00
Boone Gorges
18d6b3c8dc Force comment pagination on single posts.
Previously, the 'page_comments' toggle allowed users to disable comment
pagination. This toggle was only superficial, however. Even with
'page_comments' turned on, `comments_template()` loaded all of a post's
comments into memory, and passed them to `wp_list_comments()` and
`Walker_Comment`, the latter of which produced markup for only the
current page of comments. In other words, it was possible to enable
'page_comments', thereby showing only a subset of a post's comments on a given
page, but all comments continued to be loaded in the background. This technique
scaled poorly. Posts with hundreds or thousands of comments would load slowly,
or not at all, even when the 'comments_per_page' setting was set to a
reasonable number.

Recent changesets have addressed this problem through more efficient tree-
walking, better descendant caching, and more selective queries for top-level
post comments. The current changeset completes the project by addressing the
root issue: that loading a post causes all of its comments to be loaded too.

Here's the breakdown:

* Comment pagination is now forced. Setting 'page_comments' to false leads to evil things when you have many comments. If you want to avoid pagination, set 'comments_per_page' to something high.
* The 'page_comments' setting has been expunged from options-discussion.php, and from places in the codebase where it was referenced. For plugins relying on 'page_comments', we now force the value to `true` with a `pre_option` filter.
* `comments_template()` now queries for an appropriately small number of comments. Usually, this means the `comments_per_page` value.
* To preserve the current (odd) behavior for comment pagination links, some unholy hacks have been inserted into `comments_template()`. The ugliness is insulated in this function for backward compatibility and to minimize collateral damage. A side-effect is that, for certain settings of 'default_comments_page', up to 2x the value of `comments_per_page` might be fetched at a time.
* In support of these changes, a `$format` parameter has been added to `WP_Comment::get_children()`. This param allows you to request a flattened array of comment children, suitable for feeding into `Walker_Comment`.
* `WP_Query` loops are now informed about total available comment counts and comment pages by the `WP_Comment_Query` (`found_comments`, `max_num_pages`), instead of by `Walker_Comment`.

Aside from radical performance improvements in the case of a post with many
comments, this changeset fixes a bug that caused the first page of comments to
be partial (`found_comments` % `comments_per_page`), rather than the last, as
you'd expect.

Props boonebgorges, wonderboymusic.
Fixes #8071.
Built from https://develop.svn.wordpress.org/trunk@34561


git-svn-id: http://core.svn.wordpress.org/trunk@34525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 20:40: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
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
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
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
Boone Gorges
a034a3394a Bail early when invalid ID is passed to get_comment_class().
This helps to avoid PHP notices later in the function.

Props walterebert, dipesh.kakadiya, DrewAPicture.
Fixes #33947.
Built from https://develop.svn.wordpress.org/trunk@34454


git-svn-id: http://core.svn.wordpress.org/trunk@34418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-23 14:09:26 +00:00
Scott Taylor
1d0774e784 Add title_reply_before and title_reply_after args to comment_form() to allow the "Leave a Reply" heading level to be changed.
Props tyxla.
Fixes #33775.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 19:18:26 +00:00
Boone Gorges
32887d3dfb Lazy-load comment meta on single post pages.
[34268] introduced cache priming for commentmeta, enabled by default. To
ensure performance on single post pages - where commentmeta is most likely
to cause performance issues - we disable up-front cache-priming. Instead, we
prime commentmeta caches for all comments in the loop the first time
`get_comment_meta()` is called on the page.

Props bradt, dd32, wonderboymusic, boonebgorges.
Fixes #16894.
Built from https://develop.svn.wordpress.org/trunk@34270


git-svn-id: http://core.svn.wordpress.org/trunk@34234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 20:01:24 +00:00
Scott Taylor
af593128a7 Revert [33925], by-reference array manipulation is breaking comments in some themes.
This implementation is losing its shine.

See #16894.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 18:14:25 +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
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
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
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
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
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
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
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
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
Scott Taylor
e73ee5ac98 Introduce WP_Comment class to model/strongly-type rows from the comments database table. Inclusion of this class is a pre-req for some more general comment cleanup and sanity.
* Takes inspiration from `WP_Post` and adds sanity to comment caching. 
* Clarifies when the current global value for `$comment` is returned. The current implementation in `get_comment()` introduces side effects and an occasion stale global value for `$comment` when comment caches are cleaned.
* Strongly-types `@param` docs
* This class is marked `final` for now

Props wonderboymusic, nacin.

See #32619.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 18:17:24 +00:00
Sergey Biryukov
f59f2a8e4f Restore rel='nofollow' for comment reply links to reduce extra crawling by search engines.
This reverts [16230], which didn't have enough review at the time of commit.

props joostdevalk.
see #22889, #18547, #16881.
Built from https://develop.svn.wordpress.org/trunk@33047


git-svn-id: http://core.svn.wordpress.org/trunk@33018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-02 11:09:25 +00:00
Mark Jaquith
cf38b016e8 Revert [33038] because of objections raised on #22889 and #31590
Built from https://develop.svn.wordpress.org/trunk@33042


git-svn-id: http://core.svn.wordpress.org/trunk@33013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-02 00:47:24 +00:00
Mark Jaquith
d51f1c1a0f Restore $noreplytext default value in comment_form_title()
props ocean90
see #22889
Built from https://develop.svn.wordpress.org/trunk@33039


git-svn-id: http://core.svn.wordpress.org/trunk@33010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 21:51:25 +00:00
Mark Jaquith
9d11efe23c Say goodbye to ?replytocom=123 links and their URL pollution.
* Comment reply links continue to use JS as before.
* ?replytocom=123 links are deprecated.

props joostdevalk
fixes #22889
Built from https://develop.svn.wordpress.org/trunk@33038


git-svn-id: http://core.svn.wordpress.org/trunk@33009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 21:42:25 +00:00
Konstantin Obenland
898bb2ed34 Remove allowed tags from comment form.
It can be confusing to users and for most it is not relevant.
Commenters comfortable with HTML will know which tags are likely
to be accepted.

Props krogsgard, rachelbaker.
Fixes #30157.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 14:15:26 +00:00
Scott Taylor
d71d2c062e In get_comment_reply_link(), when generating the reply link, add the replytocom query arg to the result of get_permalink() on the current $post, instead of the current global request URI.
Props nazmul.hossain.nihal.
Fixes #31333.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 00:19:25 +00:00
Andrew Nacin
7080c8e24b Update comment caches in WP_Comment_Query, rather than comments template.
props dd32.
fixes #31081.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 19:21:25 +00:00
Scott Taylor
bd8fafea54 Use void instead of null where appropriate when pipe-delimiting @return types. If a @return only contains void, remove it.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-24 05:40:25 +00:00
Scott Taylor
876918dc53 Add missing doc blocks to comment-template.php.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-24 05:19:24 +00:00
Sergey Biryukov
96f787260f In comment_form(), ensure that filtered arguments contain all required default values.
props boonebgorges.
fixes #32312 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32511


git-svn-id: http://core.svn.wordpress.org/trunk@32481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-19 01:04:25 +00:00
Sergey Biryukov
ed0da72d97 Replace echo __() with _e().
props marsjaninzmarsa.
fixes #32239.
Built from https://develop.svn.wordpress.org/trunk@32333


git-svn-id: http://core.svn.wordpress.org/trunk@32304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-03 16:18:28 +00:00
Helen Hou-Sandí
3fdd3ba9b5 Don't add a class for comment authors who are members of the current site.
Reverts [32245] and [31518]. We'll keep the whitespace and comment clarification, though.

see #24054.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-21 23:36:25 +00:00
Helen Hou-Sandí
f8c7817077 Comment: rename the comment-author-is-site-member class to bysiteuser for consistency.
Final decision on keeping the class yet to be made.

props DrewAPicture.
see #24054.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-21 14:20:25 +00:00
Drew Jaynes
88906c324b Remove backtick-escaping around a core function in the hook docs for the comment_form_submit_field filter.
See [31699]. See #31888.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 15:39:29 +00:00
Dominik Schilling
7de1a2e143 Comments: Move HTML tags for screen reader text into translatable strings.
Placeholders aren't helpful and it's much easier to make a mistake if you're dealing with placeholders.
Introduced in [31388].

props pento.
fixes #26553.
Built from https://develop.svn.wordpress.org/trunk@31821


git-svn-id: http://core.svn.wordpress.org/trunk@31803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 21:52:27 +00:00
Drew Jaynes
110d60c6cf Add a changelog entry to the DocBlock for comment_form() for the class_submit argument added in 4.1.
See [29809]. See #20446.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-17 18:38:29 +00:00
Boone Gorges
7e7a0304d2 Improved customizability for the Submit button in comment_form().
The new 'submit_button' and 'submit_field' parameters for `comment_form()`
allow developers to modify the markup of the submit button and its wrapper.
These params are accompanied by targeted 'comment_form_submit_button' and
'comment_form_submit_field' filters on the concatenated markup.

Props coffee2code, morpheu5, DrewAPicture, boonebgorges.
Fixes #15015.
Built from https://develop.svn.wordpress.org/trunk@31699


git-svn-id: http://core.svn.wordpress.org/trunk@31680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 19:08:26 +00:00
Jeremy Felt
646e643e5d Add comment-author-is-site-member class to comment output for site members.
Add a class to allow targeting of comments made by members of a site rather than users of the entire network.

Props Viper007Bond, MikeHansenMe.

Fixes #24054.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-23 02:52:24 +00:00
Sergey Biryukov
612b9e8ffd Replace hardcoded usage of comment-page with the comment pagination base.
props johnbillion, SergeyBiryukov, webord.
fixes #18084.
Built from https://develop.svn.wordpress.org/trunk@31459


git-svn-id: http://core.svn.wordpress.org/trunk@31440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-14 03:48:27 +00:00
Sergey Biryukov
7ff18dae4e Add .comment-reply-login class to get_post_reply_link(), for consistency with get_comment_reply_link().
props johnjamesjacoby.
fixes #31298.
Built from https://develop.svn.wordpress.org/trunk@31412


git-svn-id: http://core.svn.wordpress.org/trunk@31393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-11 16:11:28 +00:00
Sergey Biryukov
973d157615 Switch to a string placeholder, as number_format_i18n() returns a string.
see #26553.
Built from https://develop.svn.wordpress.org/trunk@31402


git-svn-id: http://core.svn.wordpress.org/trunk@31383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 05:45:28 +00:00
Sergey Biryukov
fdfd15aacc Use _n() in comments_popup_link() when setting the default string to display if there are more than one comment.
see #26553.
Built from https://develop.svn.wordpress.org/trunk@31401


git-svn-id: http://core.svn.wordpress.org/trunk@31382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 02:51:28 +00:00
Aaron Jorbin
c99149419d Add translator comments for new strings.
These strings were added in [31388].

Props ocean90.
Fixes 26553.


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


git-svn-id: http://core.svn.wordpress.org/trunk@31370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-09 20:15:27 +00:00
Aaron Jorbin
4f08e9d383 Use screen reader text instead of a title attribute in comments_popup_link
To better understand screen reader text, check out https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/

Screen Reader text improves the user experience for screen reader users. It provides additional context for links, document forms and other pieces of a page that may exist visually, but are lost when looking only at the html of a site.  This does change the output of comments_popup_link if you don't pass in values for $zero, $one, $more or $none. Theme authors can and should style <code>.screen-reader-text</code> in ways that are recommended in the above article to hide it visually.

Props joedolson
Fixes #26553




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


git-svn-id: http://core.svn.wordpress.org/trunk@31369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-09 19:27:28 +00:00
Scott Taylor
5f9a800110 In comment_form(), add the HTML5 required attribute next to aria-required in fields that utilize it.
Props MMN-o.
Fixes #24732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 15:56:23 +00:00
Sergey Biryukov
6e29458407 Remove a redundant inline comment with a typo.
props nicnicnicdevos.
fixes #30956.
Built from https://develop.svn.wordpress.org/trunk@31103


git-svn-id: http://core.svn.wordpress.org/trunk@31084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 21:29:24 +00:00
Scott Taylor
60b0cd7943 The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Scott Taylor
f5f3006981 Remove whitespace side effects from comment_form().
Props timersys.
Fixes #30500.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 06:27:24 +00:00
Drew Jaynes
ad297dab6d Correctly capitalize JavaScript throughout core docs.
Fixes #30569.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 00:31:22 +00:00
Scott Taylor
e619abda6e Improve various @param docs for src/wp-includes/*.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 01:34:24 +00:00
Drew Jaynes
bffe95d34c Docs Formatting: Backtick-escape inline code for all remaining dynamic hook docs in wp-includes/*.
Affects DocBlocks for the following hooks:
* `auth_post_meta_{$meta_key}`
* `term_links-$taxonomy`
* `customize_render_control_ . $this->id`
* `customize_render_panel_{$this->id}`
* `customize_render_section_{$this->id}`
* `customize_preview_{$this->id}`
* `customize_save_ . $this->id_data[ 'base' ]`
* `customize_update_ . $this->type`
* `customize_value_ . $this->id_data[ 'base' ]`
* `customize_sanitize_js_{$this->id}`
* `comment_form_field_{$name}`
* `comment_{$old_status}_to_{$new_status}`
* `comment_{$new_status}_{$comment->comment_type}`
* `extra_{$context}_headers`
* `get_template_part_{$slug}`
* `get_the_generator_{$type}`
* `get_{$adjacent}_post_join`
* `get_{$adjacent}_post_where`
* `get_{$adjacent}_post_sort`
* `{$adjacent}_post_rel_link`
* `{$adjacent}_post_link`
* `{$adjacent}_image_link`
* `blog_option_{$option}`
* `$permastructname . _rewrite_rules`
* `{$type}_template`
* `theme_mod_{$name}`
* `pre_set_theme_mod_$name`
* `current_theme_supports-{$feature}`
* `get_user_option_{$option}`
* `edit_user_{$field}`
* `pre_user_{$field}`
* `user_{$field}`

See #30552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 12:10:23 +00:00
Drew Jaynes
4432dc752b 4.1 Docs Audit: Various formatting fixes for inline documentation in class-wp-list-table.php and comment-template.php.
See #30469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 11:22:23 +00:00
Peter Westwood
6c40c6f2e2 Fix the passing of commenter cookie data to the comment API so that we don't try and fetch all unapproved comments for users with no-email address when we only have an author.
Fixes #19623

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


git-svn-id: http://core.svn.wordpress.org/trunk@30536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 10:51:22 +00:00
Drew Jaynes
de809a5a86 Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.
Affects DocBlocks for the following core elements:
* Remove HTML tag from parameter description in `comment_form()`
* Remove HTML tag from a summary for the `comment_form_top` hook
* Markdown-indent a code snippet in the description for `get_linkobjectsbyname()`
* Markdown-indent a code snippet and format an unordered list in the description for `get_linkobjects()`
* Backtick-escape some inline code in the description for `clean_pre()`
* Remove HTML tag from the summary for the `rss_tag_pre` hook
* Various formatting fixes in the descriptions for `get_filesystem_method()` and `request_filesystem_credentials()`

Props rarst for the initial patch.
See #30473.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 05:19:23 +00:00
Drew Jaynes
39a44f62ad Update the changelogs for the comment hook parameters added in [30092].
Parameters were added to the `get_comment_author`, `comment_author`, `get_comment_author_email`, `author_email`, `comment_email`, `get_comment_author_link`, `get_comment_author_IP`, `get_comment_author_url`, `comment_url`, `get_comment_excerpt`, `comment_excerpt`, `get_comment_ID`, and `get_comment_type` filters.

Fixes #22380.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 03:52:22 +00:00
Peter Westwood
664f19e28a Comment Template Tags: Improve the availability of context information in comment template tag filters.
Fixes #22380 props momo360modena, tareq1988.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-29 19:07:22 +00:00
Sergey Biryukov
0c2c7ad204 Add 'comment_reply_link_args' filter for get_comment_reply_link() arguments.
props joedolson, aaroncampbell, DrewAPicture.
fixes #10569.
Built from https://develop.svn.wordpress.org/trunk@30039


git-svn-id: http://core.svn.wordpress.org/trunk@30039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-27 11:45:18 +00:00
Boone Gorges
304802d70d Use the comment API rather than direct SQL queries in comments_template().
`comments_template()` is used by most themes to display a post's comments. It
shows all comments that have been approved, and also shows all pending comments
by the current visitor (as determined by the comment cookies). However, the
comments API previously had no way of querying for "all comments that are
either approved, or are unapproved but written by foo@example.com". The
workaround was a direct SQL query: uncached, not subject to the same filters as
other comment queries, and just generally icky.

The new `include_unapproved` parameter for `WP_Comment_Query` accepts an array
of user IDs or email addresses. Pending comments associated with users in this
array will be included in query results, regardless of the value of the 'status'
parameter. In `comments_template()`, we leap from direct SQL queries to
`get_comments()` plus `include_unapproved', striving to put right what once
went wrong.

Props boonebgorges, simonwheatley, hardy101, jesin.
Fixes #19623.
Built from https://develop.svn.wordpress.org/trunk@29965


git-svn-id: http://core.svn.wordpress.org/trunk@29712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-19 19:39:20 +00:00
Dominik Schilling
bf16aac8e1 Comments: Don't print an empty HTML markup when comment_reply_link() returns no link.
props obenland.
fixes #29895.
Built from https://develop.svn.wordpress.org/trunk@29908


git-svn-id: http://core.svn.wordpress.org/trunk@29662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 21:56:19 +00:00
Sergey Biryukov
965b6d54b6 Add aria-describedby attributes to comment_form().
props joedolson, bramd.
fixes #24148.
Built from https://develop.svn.wordpress.org/trunk@29846


git-svn-id: http://core.svn.wordpress.org/trunk@29609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-06 22:11:15 +00:00
Sergey Biryukov
6d0f2dcf11 Make link construction in get_comment_reply_link() and get_post_reply_link() more readable.
see #16433.
Built from https://develop.svn.wordpress.org/trunk@29823


git-svn-id: http://core.svn.wordpress.org/trunk@29589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 20:45:16 +00:00
Sergey Biryukov
70c88e59b1 Add an aria-label attribute with commenter's name to get_comment_reply_link().
props joedolson, merty, andrewryno.
fixes #16433.
Built from https://develop.svn.wordpress.org/trunk@29822


git-svn-id: http://core.svn.wordpress.org/trunk@29588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 20:41:16 +00:00
Sergey Biryukov
0797823c55 Add a class attribute for submit button in comment form.
props bainternet.
fixes #20446.
Built from https://develop.svn.wordpress.org/trunk@29809


git-svn-id: http://core.svn.wordpress.org/trunk@29575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 01:44:15 +00:00
Scott Taylor
0005433983 Correct a few @param docs for $walker.
Props dnaber-de.
Fixes #29011.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 22:25:16 +00:00
Drew Jaynes
c5a59037f1 Inline documentation cleanup for 4.0 audit.
Various improvements:
* Adds `@see` reference for `wp_list_comments()` in 'wp_list_comments_args' filter docs, added in [28285]
* Various phpDoc tweaks for the 'run_wptexturize' filter docs, added in [28715]
* Sentence and wrapping changes for `is_https_url()`, added in [28894]
* Documents the `$args` parameter for `wp_dropdown_languages()`, added in [29007]
* Adds a period to the parameter description for `_update_posts_count_on_delete()`, added in [28835]
* Documents a global in `is_customize_preview()`, added in [28999]
* phpDoc tweaks, adds an access modifier for `wpdb::esc_like()`, added in [28711]

See #28885.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-14 01:02:15 +00:00
Scott Taylor
ef436cb6e0 Revert [28563]. See #18298.
Built from https://develop.svn.wordpress.org/trunk@29044


git-svn-id: http://core.svn.wordpress.org/trunk@28832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-09 18:07:16 +00:00
Drew Jaynes
d4dd02b4ae Remove backticks on $post variables in some short parameter descriptions.
See [28653], [28654].
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:28:14 +00:00
Scott Taylor
21864a98d0 Add a function, get_comments_number_text(), that returns instead of echoing. comments_number() wraps it.
Props kapeels, nbachiyski.
Fixes #10177.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-29 23:13:15 +00:00
Scott Taylor
0ba605c55c Ensure that a has_children parameter is given to Walker::start_el().
Adds unit tests.

Props scribu, obenland.
Fixes #14041.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-24 17:06:14 +00:00
Scott Taylor
919ff69120 In comment_form(), allow name_submit to be passed to change the name attribute of the submit button.
Props obenland.
Fixes #22792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-24 00:10:15 +00:00
Drew Jaynes
3724252959 Ensure $post_id is documented as optional where applicable.
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-03 04:44:16 +00:00
Scott Taylor
2d6721dbc9 Fix an error caused by [28604] in get_comments_number() unit tests.
Props SergeyBiryukov.
Fixes #26240.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 19:47:14 +00:00
Dominik Schilling
d40280d0db Pass $post->ID to get_comments_number filter.
Also fixes indentation and a typo in corresponding filter docs.

see #26240.
Built from https://develop.svn.wordpress.org/trunk@28604


git-svn-id: http://core.svn.wordpress.org/trunk@28428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-28 22:36:15 +00:00
Drew Jaynes
6989c5ab46 Fix parameter description for the $post_id argument in get_comments_number() to note that it is optional.
Also fixes the corresponding filter docs, as `$post_id`, not `$post` is passed to the filter.

See [27156]. Fixes #26240.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-28 22:05:18 +00:00
Scott Taylor
b75c79500b Replaces all uses of TEMPLATEPATH and STYLESHEETPATH in core with get_template_directory() and get_stylesheet_directory().
Add `@deprecated` annotations to `TEMPLATEPATH` and `STYLESHEETPATH` definitions.

Props obenland, aaroncampbell. 
Fixes #18298.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 20:12:15 +00:00
Scott Taylor
e8181b0934 Allow get_comments_number() to officially accept $post or $post_id. Adds unit tests.
Props coffee2code, JanHenkG.
Fixes #26240.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 17:44:14 +00:00
Scott Taylor
dfa4de15fa Add missing access modifiers to methods/members in Walker and subclasses. Add a magic __get() method.
See #27881, #22234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:00:15 +00:00
Scott Taylor
78b6f2761d Eliminate use of extract() in get_comment_reply_link().
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 15:35:15 +00:00
Scott Taylor
7943f4715a Eliminate the use of extract() in get_post_reply_link().
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 06:49:14 +00:00
Scott Taylor
0e2909ce89 Eliminate the use of extract() in wp_list_comments(). All unit tests pass.
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 06:43:15 +00:00
Scott Taylor
de262f553c In wp-includes/comment-template.php, remove dead code:
* In `get_comment_reply_link()`, `$link` is set twice before it is used.
* In `Walker_Comment::start_lvl()`, `case 'ul':` is unreachable unless placed before `default:`. 
* In `Walker_Comment::end_lvl()`, `case 'ul':` is unreachable unless placed before `default:`.
* In `comment_form()`, `$id` is conditionally set and never used. 

See #27882.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 21:15:17 +00:00
Sergey Biryukov
d70e8a38fa Add a filter for wp_list_comments() arguments.
props greenshady, hlashbrooke.
fixes #19581.
Built from https://develop.svn.wordpress.org/trunk@28285


git-svn-id: http://core.svn.wordpress.org/trunk@28113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 11:58:14 +00:00
Drew Jaynes
5e51ea9940 Priority fixes for various existing hook documentation.
Props kpdesign.
See #26869

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


git-svn-id: http://core.svn.wordpress.org/trunk@27914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-12 00:01:15 +00:00
Drew Jaynes
acf9fbc808 Remove a blank line and @global reference in the PHPDoc for comment_author_email_link().
Props norcross, ocean90.
Fixes #27655.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-04 04:36:15 +00:00
Andrew Nacin
502ac958e5 Pass walker arguments to get_comment_link() so pagination works when wp_list_comments() is used outside the comment template.
props SergeyBiryukov.
fixes #27007.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 02:38:14 +00:00
Sergey Biryukov
8343fabff6 Avoid a notice in trackback_rdf() if user agent is not set.
props joostdevalk.
fixes #27374.
Built from https://develop.svn.wordpress.org/trunk@27514


git-svn-id: http://core.svn.wordpress.org/trunk@27357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-12 12:54:15 +00:00
Andrew Nacin
1699153d26 Pass the comment object to the get_comment_date and get_comment_time.
props SergeyBiryukov.
fixes #19849.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 16:41:14 +00:00
Drew Jaynes
cb8951b0b3 Remove all @package and @subpackage PHPDoc tags not at the file- or class-levels in core.
See #27200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:14:14 +00:00
Drew Jaynes
c8665c5973 Fix a typo in the PHPDoc for comment_author_email_link().
See #27083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 04:07:12 +00:00
Drew Jaynes
8eb2d3610b Inline documentation cleanup in wp-includes/comment-template.php.
This cleanup follows [25567] and brings the docs in-line with standards that at the time had not yet been finalized.

These changes include
* Moving in-line `@see` tags to their own lines
* Using docs-specific variables in hook docs
* Fixing line-wrapping throughout
* Typos and punctuation
* Converting hash notation values to variables per the standard

Fixes #27083. See #20495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 03:20:12 +00:00
Drew Jaynes
cd8cedc40d First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +00:00
Andrew Nacin
808653e2a3 Add echo arguments to wp_list_comments() and Walker_Comment, allowing non-echo usage.
props mikelittle.
fixes #10948.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-24 14:59:10 +00:00
Andrew Nacin
d0cfa40983 Add jshintrc to qunit.
props jorbin.
see #25187.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 14:39:10 +00:00
Drew Jaynes
15fb059069 Inline documentation for the Walker_Comment class in wp-includes/comment-template.php
Fixes #25388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 23:29:11 +00:00
Drew Jaynes
681b1c35b5 Inline documentation for hooks in wp-includes/comment-template.php.
Fixes #25396.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 21:21:09 +00:00
Drew Jaynes
731db6bcb5 Inline documentation for comment_form() argument defaults missed in [25573].
See #25388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 17:30:08 +00:00
Drew Jaynes
fe40604971 Improve inline documentation of arguments for comment_form().
See #25388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 17:16:08 +00:00
Drew Jaynes
e4987beba3 Inline documentation improvements for wp-includes/comment-template.php.
Changes include:
- Existing phpdoc block improvements
- Inclusion of defaults for optional parameters
- Hash-notated argument arrays
- Removal of unnecessary or redundant tagging.

Also standardization of int|WP_Post function parameters.

These changes clear the way toward less redundancy for hook docs in a future ticket.

Still left: Fully documented arguments in `comment_form()` and a pass through Walker_Comment.

See #20495. See #25388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 04:16:08 +00:00
Dominik Schilling
8546983da6 Replace !$user_ID with !is_user_logged_in(). props garyc40. see #15508.
Built from https://develop.svn.wordpress.org/trunk@25562


git-svn-id: http://core.svn.wordpress.org/trunk@25480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-22 10:16:09 +00:00
Scott Taylor
11db0d3b01 Add an $args parameter to comment_text and get_comment_text filters. Adds filter docs. Improve docblocks for get_comment_text() and comment_text().
Props simonwheatley, ericlewis, DrewAPicture.
Fixes #14856. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@25475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-21 18:18:09 +00:00
Drew Jaynes
98d5c50e5f Clarify phpdoc for get_comment_author_link().
props nofearinc. Fixes #24508.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-19 05:56:10 +00:00
Sergey Biryukov
7407bd1946 Inline documentation for get_comment_reply_link() and 'comment_reply_link' filter.
props DrewAPicture.
fixes #25310.
Built from https://develop.svn.wordpress.org/trunk@25428


git-svn-id: http://core.svn.wordpress.org/trunk@25352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-13 19:20:09 +00:00
Sergey Biryukov
9e9b9b5508 Make sure $args is an array before treating it as such. fixes #25151 for trunk.
Built from https://develop.svn.wordpress.org/trunk@25151


git-svn-id: http://core.svn.wordpress.org/trunk@25130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-28 05:28:09 +00:00
Andrew Nacin
e01352fe2f Ensure a user exists in get_comment_author().
props azaozz.
see #24084.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-27 13:17:09 +00:00
Andrew Nacin
71af3a2004 Remove pattern="" in the comment form (HTML5 mode) to avoid mistaken :invalid styles.
This was originally included for Opera 10, but is not needed as of Opera 11, and current is Opera 15.

props jorbin, markjaquith.
fixes #24475.



git-svn-id: http://core.svn.wordpress.org/trunk@24573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 21:59:10 +00:00
Dominik Schilling
f27e762085 Replace the cite element with a b element to markup the comment author in comment_html5().
In HTML5 the `cite` element isn't valid for just an author's name.
"The cite element represents the title of a work [..] A person's name is not the title of a work" (http://www.w3.org/TR/html5/text-level-semantics.html#the-cite-element)

fixed #24522.

git-svn-id: http://core.svn.wordpress.org/trunk@24539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-01 18:26:16 +00:00
Andrew Nacin
ca1e73ca84 Comment form: Add HTML classes.
* #respond gains .comment-respond
 * #reply-title gains .comment-reply-titlw
 * form gains .comment-form

props obenland.
see #23851.



git-svn-id: http://core.svn.wordpress.org/trunk@24525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-27 21:18:08 +00:00
Andrew Nacin
5969819038 `add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form' ) );'
props obenland.
see #23850.



git-svn-id: http://core.svn.wordpress.org/trunk@24417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-06 15:31:34 +00:00
Sergey Biryukov
4b13a1ffa4 Fix E_STRICT notices in walkers. props dvarga. see #24356.
git-svn-id: http://core.svn.wordpress.org/trunk@24377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-28 03:29:15 +00:00
Andrew Nacin
7cc15a2e7f Remove use of global $id from comment_form() and the media list table. see #24330.
git-svn-id: http://core.svn.wordpress.org/trunk@24337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-23 18:40:16 +00:00
Sergey Biryukov
57c10eadbb Use ellipsis instead of three dots. props tjsingleton, jordie23, wojtek.szkutnik, DrewAPicture, SergeyBiryukov. see #8714.
git-svn-id: http://core.svn.wordpress.org/trunk@24207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 21:27:31 +00:00
Andrew Nacin
92b4636e17 Required arguments can't follow optional arguments.
Make required arguments optional in confirm_blog_signup().

Mark arguments as required in _future_post_hook(), the walker method display_element(), get_author_link() (deprecated), and the WP_Widget constructor.

props rlerdorf.
see #24210.



git-svn-id: http://core.svn.wordpress.org/trunk@24126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 13:26:31 +00:00
Sergey Biryukov
2c63da143b Fix inconsistent spacing in comment_form(). props sim, TravisHoffman. fixes #23878.
git-svn-id: http://core.svn.wordpress.org/trunk@23932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-07 23:57:35 +00:00
Mark Jaquith
b3f6427c6f Improve wp_list_comments() markup.
* Whitespace cleanup
* Accepts format=html5 which uses some of the HTML5 elements
* Some helpful HTML comments to help untangle the HTML
* Other misc code cleanup

props lancewillett, obenland, georgestephanis. fixes #20088.

git-svn-id: http://core.svn.wordpress.org/trunk@23694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-14 04:26:04 +00:00
Mark Jaquith
a1e32d3217 Add the ability to use HTML5 input types in the comment form.
props jorbin, georgestephanis, obenland. fixes #15080

git-svn-id: http://core.svn.wordpress.org/trunk@23689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-13 20:31:43 +00:00
Andrew Nacin
f994ff39ac Add filters to comments_link_feed(), comment_link(), and get_comments_link(). esc_url() the echoed output of comments_link().
props MarcusPope.
fixes #19210.



git-svn-id: http://core.svn.wordpress.org/trunk@23624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-06 19:57:31 +00:00
Ryan Boren
3854fe2e0f Put required field indicators within labels. Update styling of bundled themes to accommodate. Props MikeHansenMe. fixes #21897
git-svn-id: http://core.svn.wordpress.org/trunk@22123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-05 16:34:32 +00:00
Ryan Boren
359de78b7d Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: http://core.svn.wordpress.org/trunk@22115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-04 18:26:25 +00:00
Ryan Boren
faca571a3a Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: http://core.svn.wordpress.org/trunk@22114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-04 18:21:47 +00:00
Ryan Boren
cfb35a9d85 Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 16:29:28 +00:00
ryan
7b49ad8493 Introduce get_edit_user_link(). Props scribu, georgestephanis, johnbillion. fixes #14787 see #20307
git-svn-id: http://core.svn.wordpress.org/trunk@21364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-30 18:30:03 +00:00
ryan
50fc51d8d2 Don't attempt to define the COMMENTS_TEMPLATE constant twice. Props kitchin. fixes #21337
git-svn-id: http://core.svn.wordpress.org/trunk@21330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 17:54:35 +00:00
ryan
ef95736bce Set the global comment var before invoking callbacks in wp_list_comments(). Props sirzooro. fixes #21184
git-svn-id: http://core.svn.wordpress.org/trunk@21324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 16:27:48 +00:00
ryan
01dd4131b8 Don't allow unfiltered HTML comments from a frame. Props nacin. fixes #20812
git-svn-id: http://core.svn.wordpress.org/trunk@20974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-01 20:47:08 +00:00
nacin
5ab06c336e In comment_form(), pass the $post_id to comments_open(). props insertvisionhere. fixes #20572.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-30 01:47:22 +00:00
ryan
de41bc288b Introduce WP_User::exists(). see #20372
git-svn-id: http://svn.automattic.com/wordpress/trunk@20378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-06 19:18:45 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan
83b131f8e3 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan
fd1393ab7a Clear strict notices for the walkers. fixes #19249
git-svn-id: http://svn.automattic.com/wordpress/trunk@19679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-04 23:03:46 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
nacin
30ff37104d Don't use $user_identity global. props duck_. fixes #19146.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-14 21:35:44 +00:00
duck_
e4ed63fc6f Fix typos in documentation (wp-includes/[a-h]). See #18560.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-03 16:02:41 +00:00
ryan
29592dafb6 Pass post id along to *comment_id_fields(). Props natecook. fixes #17193
git-svn-id: http://svn.automattic.com/wordpress/trunk@17812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-05 19:33:47 +00:00
nacin
e1eec3925a More @since. props SergeyBiryukov, fixes #15445.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-20 09:25:21 +00:00
westi
e69d948ca4 Revert [16649] - The core output on this is for logged out users only - need to rework this if we want to move the output. See #14510
git-svn-id: http://svn.automattic.com/wordpress/trunk@16704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-03 09:44:17 +00:00
ryan
a031db170f Fix comment_notes_before. Props mrmist. fixes #14510
git-svn-id: http://svn.automattic.com/wordpress/trunk@16649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-01 16:52:32 +00:00
nbachiyski
368eefd69c comments_number() doesn't need to call get_the_ID(), because get_comments_number() does it if post ID is missing
git-svn-id: http://svn.automattic.com/wordpress/trunk@16613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-29 17:34:43 +00:00
scribu
41592d266b Remove nofollow on comment reply links. Fixes #10550
git-svn-id: http://svn.automattic.com/wordpress/trunk@16230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-07 01:06:37 +00:00
nacin
0552424317 Revert submit_button() for wp-includes, setup-config, install, login, signup. see [16061], see #15064, fixes #15247.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-29 00:31:27 +00:00
markjaquith
fc6e89da45 Expand submit_button() capabilities. Replace all (or almost all) manual HTML instances in WP. props sbressler. see #15064
git-svn-id: http://svn.automattic.com/wordpress/trunk@16061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-28 21:56:43 +00:00
nacin
a07ec69bce Add a class to 'Your comment is awaiting moderation' in the comment walker and Twenty Ten's callback. fixes #15206.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-28 03:58:51 +00:00
nacin
76b4a3cac7 Pass comment ID from comment_text to get_comment_text. Also add the comment object as context to the filter. fixes #14261
git-svn-id: http://svn.automattic.com/wordpress/trunk@15957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-25 03:11:01 +00:00
nacin
5a20c05d27 Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 11:21:11 +00:00
nacin
650f97e684 Adjustments to [15549]. See #11624.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-04 15:51:04 +00:00
scribu
950901ca92 Don't use the global anymore. Fixes #11624
git-svn-id: http://svn.automattic.com/wordpress/trunk@15549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-28 11:57:28 +00:00
westi
64100e8783 Fix the theme compat file require paths to be fully absolute so they don't rely on a particular php path to work. Fixes #14315 for trunk props dougal.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-16 09:40:09 +00:00
nacin
69b10a2948 Restore trackback_rdf(). reverts [13991]. fixes #11139 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-03 05:55:04 +00:00
dd32
a14d289755 Alot more tabs. Props jacobsantos & Viper007bond. See #14147
git-svn-id: http://svn.automattic.com/wordpress/trunk@15355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-30 00:05:18 +00:00
nacin
f60838c8f9 s/echos/echoes/ in phpdoc. props demetris, fixes #13742.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-06 05:16:32 +00:00
nacin
249a6cdd18 Use p instead of definition list for allowed tags in comment_form(). props demetris. Style the new markup in Twenty Ten. see #10910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-16 06:38:58 +00:00
nacin
a03dfef3fd Fix typos in phpdoc for comment_form(). props demetris, fixes #10910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-10 08:47:13 +00:00
ryan
7b7243d94a Strip trailing whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:26:11 +00:00
nbachiyski
2a1d6e141b Take out the leading space from the translatable string
git-svn-id: http://svn.automattic.com/wordpress/trunk@14378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 18:48:33 +00:00
ryan
172aa06718 Revert [14347] and [14372]. It broke more than we expected. Try again in 3.1. see #13051
git-svn-id: http://svn.automattic.com/wordpress/trunk@14374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 18:16:22 +00:00
westi
ae468d52ac First pass of compatibility code for old themes which relied on using templates from the default theme without expressly identifying it as the parent theme.
Fixes #12425 and #13009.
The fallback to these template files is now depreceated and will be removed in a future version.


git-svn-id: http://svn.automattic.com/wordpress/trunk@14365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 09:57:24 +00:00
ryan
91354eefee Escape links by default. Props alexkingorg. see #13051
git-svn-id: http://svn.automattic.com/wordpress/trunk@14347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-02 22:53:59 +00:00
westi
90873d5063 Revert [14268] - It is much better to use JavaScript for this kind of enhancement. Output buffering is too fragile. See #12564.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 07:17:20 +00:00
nacin
b8b6090959 Add full HTML filter to comment_form(), along with an echo arg. props joostdevalk, fixes #12564.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 04:28:51 +00:00
nacin
e9602ae765 Clarify language for non-publication of emails. props lloydbudd, fixes #13026.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-23 15:01:21 +00:00
nacin
6bad016e80 Switch to simpler language regarding publication of email addresses in comment_form() template. props bumbu, see #13026.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 04:49:19 +00:00
dd32
7058bb3db8 Respect the comment ID parameter in comment_excerpt(). Props tenpura. Fixes #12874
git-svn-id: http://svn.automattic.com/wordpress/trunk@14128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 03:45:24 +00:00
nacin
e8c8ef08f0 Move stray closing p tag out of a translation. props chrisbliss18, fixes #13036.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-16 22:27:37 +00:00
nacin
045c407a3c Remove tabindex from comment_form(). fixes #12963
git-svn-id: http://svn.automattic.com/wordpress/trunk@14114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-16 18:29:39 +00:00
nacin
c229cdcba7 Spacing/coding cleanup of comment_form(). see #13016.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-15 16:25:08 +00:00