Commit Graph

301 Commits

Author SHA1 Message Date
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