Sergey Biryukov
38676936ba
Coding Standards: Use strict type check for in_array()
and array_search()
where strings are involved.
...
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.
Includes minor code layout fixes for better readability.
See #49542 .
Built from https://develop.svn.wordpress.org/trunk@47550
git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Sergey Biryukov
2b030a1647
Docs: Add documentation for WP_Comments_List_Table::floated_admin_avatar()
.
...
Props akbarhusen, ayeshrajans, Soean, ajayghaghretiya1, netweb, SergeyBiryukov.
Fixes #41491 .
Built from https://develop.svn.wordpress.org/trunk@47507
git-svn-id: http://core.svn.wordpress.org/trunk@47282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-25 14:43:11 +00:00
Sergey Biryukov
4f151b577e
Administration: Standardize "found in Trash" messages.
...
Props Presskopp, audrasjb.
Fixes #38669 .
Built from https://develop.svn.wordpress.org/trunk@47234
git-svn-id: http://core.svn.wordpress.org/trunk@47034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-10 04:57:06 +00:00
Sergey Biryukov
641c632b0c
Coding Standards: Use Yoda conditions where appropriate.
...
See #49222 .
Built from https://develop.svn.wordpress.org/trunk@47219
git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:55:09 +00:00
Sergey Biryukov
001ffe81fb
Docs: Improve inline comments per the documentation standards.
...
Includes minor code layout fixes for better readability.
See #48303 .
Built from https://develop.svn.wordpress.org/trunk@47122
git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
2900bb8ea7
Docs: Update links to https://secure.php.net/ , they now redirect to https://www.php.net/ .
...
See #48303 .
Built from https://develop.svn.wordpress.org/trunk@47088
git-svn-id: http://core.svn.wordpress.org/trunk@46888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-20 03:14:06 +00:00
Sergey Biryukov
2294d65753
Docs: Synchronize @return
descriptions for ::handle_row_actions()
methods in list tables.
...
Make sure `WP_Comments_List_Table::handle_row_actions()` and `WP_MS_Sites_List_Table::handle_row_actions()` return a string, for consistency with other classes.
See #49170 , #48303 .
Built from https://develop.svn.wordpress.org/trunk@47059
git-svn-id: http://core.svn.wordpress.org/trunk@46859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-11 17:59:04 +00:00
Sergey Biryukov
d2a48496d2
Docs: Add missing description for $comment
global.
...
Props immeet94, mukesh27.
Fixes #46928 . See #47110 .
Built from https://develop.svn.wordpress.org/trunk@46391
git-svn-id: http://core.svn.wordpress.org/trunk@46190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-04 22:19:57 +00:00
Sergey Biryukov
5f2c7142a1
Docs: Improve documentation for ::display()
methods in various list tables.
...
Props itowhid06.
Fixes #47947 .
Built from https://develop.svn.wordpress.org/trunk@46341
git-svn-id: http://core.svn.wordpress.org/trunk@46140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-29 11:04:58 +00:00
Sergey Biryukov
07a753cb35
Docs: Add documentation for WP_Comments_List_Table::display()
.
...
Props itowhid06, dinhtungdu.
Fixes #47929 .
Built from https://develop.svn.wordpress.org/trunk@46336
git-svn-id: http://core.svn.wordpress.org/trunk@46135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-27 23:03:58 +00:00
Sergey Biryukov
86a10090a0
Accessibility: Comments: Replace @
with at
in the displayed date format.
...
The `@` symbol makes sense in the context of email addresses, but does not have a universal meaning in the context of dates.
Props birgire, afercia, audrasjb, SergeyBiryukov.
Fixes #47893 .
Built from https://develop.svn.wordpress.org/trunk@46084
git-svn-id: http://core.svn.wordpress.org/trunk@45896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-08 23:53:55 +00:00
Sergey Biryukov
97cbf72bf9
I18N: Fix typo in a function name in [45932].
...
See #44360 .
Built from https://develop.svn.wordpress.org/trunk@45933
git-svn-id: http://core.svn.wordpress.org/trunk@45744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:57:54 +00:00
Sergey Biryukov
e199663322
I18N: Capitalize translator comments consistently, add trailing punctuation.
...
Includes minor code layout fixes.
See #44360 .
Built from https://develop.svn.wordpress.org/trunk@45932
git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov
16b8d91baa
I18N: Improve translator comments.
...
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.
Includes minor code layout fixes.
Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!
Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360 .
Built from https://develop.svn.wordpress.org/trunk@45926
git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
Sergey Biryukov
9967a3e030
Docs: Add missing description for $post
global.
...
Props immeet94.
Fixes #46503 . See #47110 .
Built from https://develop.svn.wordpress.org/trunk@45742
git-svn-id: http://core.svn.wordpress.org/trunk@45553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 12:28:56 +00:00
Gary Pendergast
cf3fa9f7c8
Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments
violations in wp-admin
.
...
See #47632 .
Built from https://develop.svn.wordpress.org/trunk@45583
git-svn-id: http://core.svn.wordpress.org/trunk@45394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 12:52:01 +00:00
Andrea Fercia
6fe48278ea
Accessibility: Comments: Improve links and buttons semantics and interaction.
...
With the exception of the "Edit" link, the "row actions" controls in the Comments table behave differently depending if JavaScript support is on or off.
When JavaScript support is off, they behave like links. When JavaScript support is on, they behave like buttons and they need to be buttons or have an ARIA `role="button"` added via JavaScript.
Lastly, the buttons in the Reply/Quick Edit form and the "Add Comment" in the edit post page meta box need to be buttons.
Fixes #43412 .
Built from https://develop.svn.wordpress.org/trunk@44759
git-svn-id: http://core.svn.wordpress.org/trunk@44591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-20 23:37:50 +00:00
Gary Pendergast
3fc76e352b
Comments: Correct the "Mine" comment count when viewing comments for a particular post.
...
The count should only be comments made on that post by the current user, not all comments by them.
Props chetan200891, garrett-eclipse.
Fixes #46014 .
Built from https://develop.svn.wordpress.org/trunk@44631
git-svn-id: http://core.svn.wordpress.org/trunk@44462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 02:45:49 +00:00
desrosj
d83d8e1154
Docs: Update since
annotation for comments_list_table_query_args
.
...
Introduced in [42420].
Fixes #42997 .
Built from https://develop.svn.wordpress.org/trunk@44530
git-svn-id: http://core.svn.wordpress.org/trunk@44361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:40:51 +00:00
Gary Pendergast
fd7086bcdc
Docs: Update the @since
tag for the comment_status_links
filter.
...
Fixes #42379 .
Built from https://develop.svn.wordpress.org/trunk@44487
git-svn-id: http://core.svn.wordpress.org/trunk@44318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-09 01:06:48 +00:00
Mel Choyce
0ec6056e40
List Table: Fix formatting issue introduced in r43671.
...
Props dd32.
See #45028 .
Built from https://develop.svn.wordpress.org/trunk@43672
git-svn-id: http://core.svn.wordpress.org/trunk@43501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-03 21:12:24 +00:00
Mel Choyce
4cee2ae135
List Table: Restore the List Table items property to allow Bulk Actions to be properly determined.
...
This fixes the display of Bulk Actions where there exists only a single page of results.
Props shaneeckert, jobthomas, dd32.
Fixes #45028 .
Built from https://develop.svn.wordpress.org/trunk@43671
git-svn-id: http://core.svn.wordpress.org/trunk@43500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-03 19:47:25 +00:00
Gary Pendergast
56c162fbc9
Coding Standards: Upgrade WPCS to 1.0.0
...
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.
This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script.
- Auto-fixable coding standards issues will now cause Travis failures.
Fixes #44600 .
Built from https://develop.svn.wordpress.org/trunk@43571
git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
John Blackbourn
1b5d6c6971
Docs: Document many more parameters and properties using typed array notation.
...
See #41756
Built from https://develop.svn.wordpress.org/trunk@42871
git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:27:32 +00:00
Andrea Fercia
d2d64f13c7
Accessibility: Change the comments "Quick Edit" and "Reply" links to buttons.
...
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.
Props Cheffeid, audrasjb, afercia.
See #43382 , #38677 .
Fixes #43376 .
Built from https://develop.svn.wordpress.org/trunk@42767
git-svn-id: http://core.svn.wordpress.org/trunk@42597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 22:36:34 +00:00
John Blackbourn
ee24b48106
Comments: Add a "Mine" link to the list of filters on the comment listing screen.
...
This filter shows comments made by the current user, and copies the same filter functionality that's available on the post listing screens.
Props Iceable
Fixes #42379
Built from https://develop.svn.wordpress.org/trunk@42684
git-svn-id: http://core.svn.wordpress.org/trunk@42512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:46:31 +00:00
Sergey Biryukov
cceab04984
Comments: Avoid extra tabs in a textarea in WP_Comments_List_Table::column_comment()
.
...
Props chetan200891, jrf.
Fixes #43252 .
Built from https://develop.svn.wordpress.org/trunk@42670
git-svn-id: http://core.svn.wordpress.org/trunk@42498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:57:32 +00:00
Rachel Baker
386a5c397f
Comments: Introduce filter for the arguments for the comment query in the comments list table.
...
Add `comments_list_table_query_args` filter to the Comments List Table.
Props soulseekah, birgire.
Fixes #42997 .
Built from https://develop.svn.wordpress.org/trunk@42420
git-svn-id: http://core.svn.wordpress.org/trunk@42251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-29 18:21:52 +00:00
Gary Pendergast
aaf99e6913
Code is Poetry.
...
WordPress' code just... wasn't.
This is now dealt with.
Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057 .
Built from https://develop.svn.wordpress.org/trunk@42343
git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Andrea Fercia
6a6795382a
Accessibility: List Tables: use aria-current
for the views current link.
...
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the
introduction in core of the `aria-current` attribute after [41359] and [41371].
Props joedolson, flixos90, afercia.
Fixes #32399 .
Built from https://develop.svn.wordpress.org/trunk@41683
git-svn-id: http://core.svn.wordpress.org/trunk@41517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:44:47 +00:00
Drew Jaynes
8c7f5367c0
Docs: Remove some more top-level @aacess
tags from function DocBlocks.
...
See #414532 .
Built from https://develop.svn.wordpress.org/trunk@41168
git-svn-id: http://core.svn.wordpress.org/trunk@41008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 08:19:43 +00:00
Drew Jaynes
1a28ec87e1
Docs: Remove @access
notations from method DocBlocks in wp-admin/* classes.
...
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.
See #41452 .
Built from https://develop.svn.wordpress.org/trunk@41161
git-svn-id: http://core.svn.wordpress.org/trunk@41001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:40:43 +00:00
Sergey Biryukov
f75e623eae
Comments: In WP_Comments_List_Table::extra_tablenav()
, save the state of ::has_items()
to a static variable, so that the value is consistent between top and bottom navigation.
...
This prevents "Empty Spam" and "Empty Trash" buttons from disappearing if there's only one page of comments in Spam/Trash.
Fixes #40975 .
Built from https://develop.svn.wordpress.org/trunk@41022
git-svn-id: http://core.svn.wordpress.org/trunk@40872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 23:05:40 +00:00
Pascal Birchler
3e189479a7
List Tables: Hide 'Empty Trash' and 'Empty Spam' buttons when view is already empty.
...
Props ivantedja, Presskopp, printsachen1, Jaydeep Rami, mathieuhays, cazm.
Fixes #38341 .
Built from https://develop.svn.wordpress.org/trunk@40297
git-svn-id: http://core.svn.wordpress.org/trunk@40204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-17 16:54:42 +00:00
Sergey Biryukov
d16bdab87d
Docs: Correct comment_email
duplicate hook reference in wp-admin/includes/class-wp-comments-list-table.php
.
...
Props keesiemeijer.
See #39371 .
Built from https://develop.svn.wordpress.org/trunk@39669
git-svn-id: http://core.svn.wordpress.org/trunk@39609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-04 13:21:41 +00:00
Andrea Fercia
eeefec932f
Administration: Improve the usage of the button CSS classes.
...
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.
- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items
Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314 , #37138 , #37448 .
Built from https://develop.svn.wordpress.org/trunk@38672
git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Scott Taylor
b7812bd416
AJAX: add a new function, wp_doing_ajax()
, which can replace... (wait for it...) DOING_AJAX
checks via the constant.
...
Props Mte90, sebastian.pisula, swissspidy.
Fixes #25669 .
Built from https://develop.svn.wordpress.org/trunk@38334
git-svn-id: http://core.svn.wordpress.org/trunk@38275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:33:30 +00:00
Peter Wilson
47d26cd9fb
DOCS: Replace HTTP links with HTTPS.
...
Replaces unsecure links in documentation and translator comments with their secure versions.
Props johnpgreen, netweb
Fixes #36993
Built from https://develop.svn.wordpress.org/trunk@37674
git-svn-id: http://core.svn.wordpress.org/trunk@37640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 04:50:33 +00:00
Rachel Baker
d287f19a0f
Comments: Remove debugging code left in WP_Comments_List_Table->get_views()
.
...
Originally introduced in [9556] and leftover from [15578].
Props dabnpits.
Fixes #36938 .
Built from https://develop.svn.wordpress.org/trunk@37624
git-svn-id: http://core.svn.wordpress.org/trunk@37592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-02 15:07:28 +00:00
Drew Jaynes
c3055cc190
Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
...
See #36913 .
Built from https://develop.svn.wordpress.org/trunk@37488
git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Rachel Baker
f99ec3db18
Comments: In the comments list table, only link rows inside the “Submitted On” column to the comment if it is publicly viewable.
...
The date within the comments list table “Submitted On” column will only be wrapped in `get_comment_link()` if the comment is approved and associated with a valid `comment_post_ID`.
Fixes #35279 .
Built from https://develop.svn.wordpress.org/trunk@36521
git-svn-id: http://core.svn.wordpress.org/trunk@36488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 21:43:26 +00:00
Boone Gorges
b5d12e130c
Comments: Restore the ability to bypass post_id filter using 0 or '0'.
...
The changes introduced in [36381], while logical and clearly awesome, introduce
the potential for much breakage. Those who want to query for comments with a
null `comment_post_ID` should use `'post_in' => array( 0 )` instead.
Reverts [36381], [36387].
See #35090 .
Built from https://develop.svn.wordpress.org/trunk@36480
git-svn-id: http://core.svn.wordpress.org/trunk@36447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 18:50:25 +00:00
Boone Gorges
00cf77999d
In comments list table, $post_id
should default to false
rather than 0.
...
After [36381], the default value of `0` was causing the list table at
edit-comments.php to be empty. `false` prevents this.
This fix is likely temporary, while more research is done into the backward
compatibility concerns tied to [36381].
See #35090 .
Built from https://develop.svn.wordpress.org/trunk@36387
git-svn-id: http://core.svn.wordpress.org/trunk@36354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 22:16:26 +00:00
Rachel Baker
9065794462
List Tables: Use the $GLOBALS array when unsetting the global post and comment in WP_Comments_List_Table::single_row()
.
...
In r35674 only the local variables were unset, when using `unset()` with a global variable the `$GLOBALS` array must be used.
Fixes #35506 .
Built from https://develop.svn.wordpress.org/trunk@36339
git-svn-id: http://core.svn.wordpress.org/trunk@36306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 02:50:27 +00:00
Andrea Fercia
2d76f3cb83
Accessibility: Remove title attributes from the Comments screen.
...
Fixes #35304 .
Built from https://develop.svn.wordpress.org/trunk@36298
git-svn-id: http://core.svn.wordpress.org/trunk@36265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 16:04:27 +00:00
John Blackbourn
f63dc802cb
Comments: Correct the docblocks for various methods in the comment list table class.
...
See #32246
Built from https://develop.svn.wordpress.org/trunk@36248
git-svn-id: http://core.svn.wordpress.org/trunk@36215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-10 00:52:25 +00:00
Ella Iseulde Van Dorpe
657d3b50af
Make date format consistent across the admin
...
The 'date_format' and 'time_format' options shouldn't affect the backend.
See #30864
Built from https://develop.svn.wordpress.org/trunk@35811
git-svn-id: http://core.svn.wordpress.org/trunk@35775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-07 04:26:27 +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
ae04eba0b6
Comments: After [35670], change the CSS class for the pending comments count back to moderated
.
...
Fixes #34680 .
Built from https://develop.svn.wordpress.org/trunk@35726
git-svn-id: http://core.svn.wordpress.org/trunk@35690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-22 15:23:26 +00:00
Scott Taylor
838592c1ba
List Tables: because we can never eradicate the existence of globals, ensure that $comment
is hoisted into the global space inside WP_Comments_List_Table::single_row()
.
...
Fixes #34654 .
Built from https://develop.svn.wordpress.org/trunk@35674
git-svn-id: http://core.svn.wordpress.org/trunk@35638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 19:05:30 +00:00
Sergey Biryukov
bc41f44158
I18N: After [34424], replace the placeholder with comments count after translate_nooped_plural()
runs, not before.
...
Props hnle.
Fixes #34680 .
Built from https://develop.svn.wordpress.org/trunk@35670
git-svn-id: http://core.svn.wordpress.org/trunk@35634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 18:04:28 +00:00
Sergey Biryukov
0d4cf36199
I18N: Remove <a>
tag from translatable string in wp-admin/includes/class-wp-comments-list-table.php
.
...
Props ramiy.
Fixes #34686 .
Built from https://develop.svn.wordpress.org/trunk@35666
git-svn-id: http://core.svn.wordpress.org/trunk@35630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 17:34:27 +00:00
Drew Jaynes
64f5e0683a
Docs: Document use of the $comment_status
global in the DocBlock for WP_Comments_List_Table::handle_row_actions()
.
...
Props shimakyohsuke.
Fixes #34425 .
Built from https://develop.svn.wordpress.org/trunk@35490
git-svn-id: http://core.svn.wordpress.org/trunk@35454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-02 21:33:27 +00:00
Dion Hulse
d2aca078b6
Comments: Use a full URL rather than a relative one for links which can contain IPv6 addresses to avoid an issue where the URL was being eaten by escaping functions.
...
See #34407 , #34202
Fixes #34054
Built from https://develop.svn.wordpress.org/trunk@35368
git-svn-id: http://core.svn.wordpress.org/trunk@35332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-23 05:14:25 +00:00
Drew Jaynes
8a386cb24f
Docs: Add missing file headers to the list table classes and adjust class DocBlocks accordingly.
...
See #33701 .
Built from https://develop.svn.wordpress.org/trunk@35241
git-svn-id: http://core.svn.wordpress.org/trunk@35207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 15:13:25 +00:00
Scott Taylor
0c2b2a0e3d
List Tables/WP_Screen: in WP_Screen
, add methods to store, retrieve, and render screen reader text, primarily used by list table screens.
...
These additions are based on an audit and recommendations by the Accessibility team. #a11y'all
Props afercia.
Fixes #32147 .
Built from https://develop.svn.wordpress.org/trunk@34891
git-svn-id: http://core.svn.wordpress.org/trunk@34856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 01:28:25 +00:00
Andrea Fercia
6fdd384fe0
Comments List Table: fix the translators comment for all count after [34506].
...
See #17275 .
Built from https://develop.svn.wordpress.org/trunk@34508
git-svn-id: http://core.svn.wordpress.org/trunk@34472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 18:40:24 +00:00
Scott Taylor
4671e03766
Comments List Table: include count for "All". Dynamically update.
...
Fixes #17275 .
Built from https://develop.svn.wordpress.org/trunk@34506
git-svn-id: http://core.svn.wordpress.org/trunk@34470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:57:25 +00:00
Scott Taylor
bc5eb3a623
Comments: add date
column to WP_Comments_List_Table
to allow sorting and to break out the date/time from the comment content column.
...
Props jshreve.
Fixes #15520 .
Built from https://develop.svn.wordpress.org/trunk@34504
git-svn-id: http://core.svn.wordpress.org/trunk@34468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:27:26 +00:00
Sergey Biryukov
8db1c75a7e
Remove extra HTML from translatable strings in WP_Comments_List_Table::get_views()
.
...
Add a context and translator comments.
Props Tmeister for initial patch.
Fixes #31859 .
Built from https://develop.svn.wordpress.org/trunk@34424
git-svn-id: http://core.svn.wordpress.org/trunk@34388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:33:25 +00:00
Scott Taylor
f9c2a88a8a
List Tables: when comparing string literals (non-numeric in nature) against vars, strict comparison can/should be used.
...
Props wonderboymusic, Viper007Bond.
Fixes #21249 .
Built from https://develop.svn.wordpress.org/trunk@34383
git-svn-id: http://core.svn.wordpress.org/trunk@34347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 06:06:25 +00:00
Sergey Biryukov
7adaef50bb
Include placeholders in translator comments.
...
See #31857 .
Built from https://develop.svn.wordpress.org/trunk@34304
git-svn-id: http://core.svn.wordpress.org/trunk@34268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:58:24 +00:00
Scott Taylor
ec01716bb2
Don't use HTML tags in translation strings for "In Reply To" links for comments in the admin.
...
Props ramiy.
Fixes #31857 .
Built from https://develop.svn.wordpress.org/trunk@34297
git-svn-id: http://core.svn.wordpress.org/trunk@34261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:36:24 +00:00
Scott Taylor
5920e8eb13
Move WP_Post_Comments_List_Table
to its own file.
...
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@34223
git-svn-id: http://core.svn.wordpress.org/trunk@34187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 06:53:24 +00:00
Scott Taylor
98acab10ea
Comments/PHP Notices: check that a parent comment exists before displaying an orphan's link to it in the admin.
...
Props rachelbaker.
Fixes #33710 .
Built from https://develop.svn.wordpress.org/trunk@34015
git-svn-id: http://core.svn.wordpress.org/trunk@33984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:51:23 +00:00
Scott Taylor
52516a68ab
After the global
churn in [33964], also set $post
to null
at the end of WP_Comments_List_Table::single_row()
to ensure that an orphaned comment doesn't inherit the previous row's $post
context.
...
See #33638 .
Built from https://develop.svn.wordpress.org/trunk@33986
git-svn-id: http://core.svn.wordpress.org/trunk@33955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 03:12:23 +00:00
Scott Taylor
71f955dc84
In WP_Comments_List_Table
, favor passing WP_Comment
instances instead of $comment_ID
to template functions. This allows us to bypass unnecessary cache lookups and simply pass the object through when it is set.
...
See #33638 .
Built from https://develop.svn.wordpress.org/trunk@33964
git-svn-id: http://core.svn.wordpress.org/trunk@33933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:00:24 +00:00
Scott Taylor
80a20e5c3d
Handle more cases (untrailingslashit
, HTTPS urls) for sanitizing an author URL for display in the comments list table.
...
Props afercia, mehulkaklotar, swissspidy, johnbillion.
Fixes #33291 .
Built from https://develop.svn.wordpress.org/trunk@33894
git-svn-id: http://core.svn.wordpress.org/trunk@33863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 23:23:24 +00:00
Drew Jaynes
375d30f699
Docs: Add a duplicate filter comment to the comment_email
filter call in WP_Comments_List_Table
, introduced in [33829].
...
See #11566 .
Built from https://develop.svn.wordpress.org/trunk@33830
git-svn-id: http://core.svn.wordpress.org/trunk@33798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 21:22:21 +00:00
Scott Taylor
a5b157ffde
Remove the hamburger global'ing from [33828]: since no args are passed to comment_author_email_link()
, the internals can be simplified and applied inline.
...
See #11566 .
Built from https://develop.svn.wordpress.org/trunk@33829
git-svn-id: http://core.svn.wordpress.org/trunk@33797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 21:09:21 +00:00
Scott Taylor
d0a1a47708
Fix warnings after [33826]. Only only one function call needs a global $comment
, we shall hamburger it.
...
See #11566 .
Built from https://develop.svn.wordpress.org/trunk@33828
git-svn-id: http://core.svn.wordpress.org/trunk@33796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 20:59:21 +00:00
Scott Taylor
7ab015c5ab
WP_Comments_List_Table::single_row()
has no reason to set the $comment
global. No other methods use it, and we are not in template/loop context. This can mess with the response of get_comment()
elsewhere, since get_comment()
internally bypasses the cache/db when a global is set.
...
See #11566 .
Built from https://develop.svn.wordpress.org/trunk@33826
git-svn-id: http://core.svn.wordpress.org/trunk@33794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 20:42:21 +00:00
Sergey Biryukov
8b1fe986c3
Use wp_html_excerpt()
to properly cut comment author URL for display on Comments screen.
...
props brettz95, solarissmoke.
fixes #15659 .
Built from https://develop.svn.wordpress.org/trunk@33825
git-svn-id: http://core.svn.wordpress.org/trunk@33793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 20:41:21 +00:00
Scott Taylor
20f6db2b18
Comment List Tables:
...
* Ensure that dynamic bubble counts are in sync by `comment_post_ID`
* Scope `:animated` to `#the-comment-list`
See #11200 .
Built from https://develop.svn.wordpress.org/trunk@33662
git-svn-id: http://core.svn.wordpress.org/trunk@33629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 16:36:25 +00:00
Scott Taylor
2e2223ae74
Comments List Table:
...
* In a view that initially has comments, but they get removed due to user actions: show the `No Items` row instead of bombing out and showing nothing (which looks broken)
* To accomplish this, in `WP_Comments_List_Table::display()`: call `->display_rows_or_placeholder()` instead of `->display()`
* Listen for the end of row `.fadeOut()`s if necessary using jQuery Promises
Fixes #11200 .
Built from https://develop.svn.wordpress.org/trunk@33657
git-svn-id: http://core.svn.wordpress.org/trunk@33624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 05:54:25 +00:00
Scott Taylor
df618f3461
Comments List Table:
...
* Show count next to "Approved"
* Properly increment/decrement counts when row actions are clicked
* In `_wp_ajax_delete_comment_response()`, return the comment's `status` with the `supplemental` data
* Handle counts properly on each scenario of `undo`
See #11200 .
Built from https://develop.svn.wordpress.org/trunk@33655
git-svn-id: http://core.svn.wordpress.org/trunk@33622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 02:51:25 +00:00
Dominik Schilling
f74a907eac
Capabilities: Fall back to the edit_posts
capability for orphaned comments.
...
Also avoid PHP notices because of orphaned comments in the comments list table.
Includes unit test.
props pento, dd32.
fixes #33154 .
Built from https://develop.svn.wordpress.org/trunk@33614
git-svn-id: http://core.svn.wordpress.org/trunk@33581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-13 22:31:24 +00:00
Helen Hou-Sandí
7b7ae2ee25
Comments list table: Display that cute lil comment bubble.
...
The comments list table suffers from "wall of text" problems, which the two plain text links compounded.
props obenland. fixes #33149 .
Built from https://develop.svn.wordpress.org/trunk@33490
git-svn-id: http://core.svn.wordpress.org/trunk@33457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 18:08:25 +00:00
Sergey Biryukov
48a1c86245
Comment string tweaks:
...
* Merge two strings about an invalid comment ID.
* Add missing context to 'Mark as Spam' string.
* Merge two 'In Response To' strings, replace redundant context with a translator comment.
props pavelevap.
fixes #32334 .
Built from https://develop.svn.wordpress.org/trunk@33436
git-svn-id: http://core.svn.wordpress.org/trunk@33403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-26 23:36:24 +00:00
Scott Taylor
4d34e37311
List Tables:
...
* In `->handle_row_actions()`, bail immediately if `$primary` and `$column_name` do not match. Saves us a nesting level and avoids declaring code that is unusable.
* In `WP_List_Table::single_row_columns()`, allow `_column_{$name}` to be called dynamically by core to avoid having to override the entirety of `->single_row_columns()` in `WP_MS_Users_List_Table` and `WP_Posts_List_Table`
* In `WP_MS_Sites_List_Table`, `id` is not a column.
Props wonderboymusic, paulwilde.
Fixes #29881 .
Built from https://develop.svn.wordpress.org/trunk@33270
git-svn-id: http://core.svn.wordpress.org/trunk@33242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-14 17:47:24 +00:00
Helen Hou-Sandí
6e73f1282e
List tables: Better accessibility and design for the comments bubble.
...
It is now plain text in the comments list table's "In Response To" column, where it was visually a bit confusing to have the bubble. For other list tables, it now shows a little notification bubble with the number of pending comments. The bubble and notification become plain text in the responsive list table view. It also shows no bubble when there are no comments at all, reducing some of the visual noise.
props picard102, afercia, karinchristen.
fixes #32152 .
Built from https://develop.svn.wordpress.org/trunk@33155
git-svn-id: http://core.svn.wordpress.org/trunk@33127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-10 21:44:25 +00:00
Helen Hou-Sandí
df220685a0
List tables: Account for comments being reused on the post edit screen.
...
Adding the `.wp-list-table` class gets us a few responsive goodies for free. And now it won't show a strange button outline.
see #32395 .
Built from https://develop.svn.wordpress.org/trunk@33101
git-svn-id: http://core.svn.wordpress.org/trunk@33072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-07 00:09:24 +00:00
Helen Hou-Sandí
8eb7f71e6b
List tables: A better responsive view.
...
Instead of truncating columns, the data that's already in the markup can now be toggled into view. Only seems appropriate to celebrate four years of contributing by finally doing the first thing I ever mocked up.
Known issues / concerns:
* Custom list tables that don't define a primary column will show nothing at all. These are not extremely common, as `WP_List_Table` isn't really recommended for plugin consumption, but it happens. We need to come up with some kind of fallback.
* Some visual elements, particularly whitespace, could use refining.
* Needs a11y review.
* Touch performance on iOS feels sluggish - is there anything we can do about that?
* Would this be better accordion-style (only one expanded at a time)?
* Is `wp_strip_all_tags()` good enough for column titles that have HTML in them? It's essentially a workaround for the fact that core's comments column does that for the icon, which maybe it shouldn't. Perhaps worth another ticket, as a markup change would be fairly independent.
* Visual hierarchy is not great when expanded (also worthy of another ticket).
* Quick edit now becomes noticeably more annoying to cancel out of, as you have to scroll all the way down and you lose your position from before it was opened. Again, worthy of another ticket.
props Michael Arestad, helen.
see #32395 .
Built from https://develop.svn.wordpress.org/trunk@33016
git-svn-id: http://core.svn.wordpress.org/trunk@32987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 01:31:25 +00:00
Scott Taylor
5c6b63d3a6
if
is a statment, not a function.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32800
git-svn-id: http://core.svn.wordpress.org/trunk@32771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 20:01:25 +00:00
Scott Taylor
f88b42be94
In WP_Comments_List_Table::column_comment()
, $post
and $the_comment_status
are unused, as is the $comment_status
global.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32736
git-svn-id: http://core.svn.wordpress.org/trunk@32707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 18:39:25 +00:00
Drew Jaynes
5457eb4933
Add missing return descriptions and fix formatting of inline documentation introduced in [32644].
...
See #25408 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@32660
git-svn-id: http://core.svn.wordpress.org/trunk@32630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-31 01:18:26 +00:00
Scott Taylor
6a08b00632
Add @access
annotations to methods that have no doc block in wp-admin/includes/*
.
...
Makes it easier to search for no doc blocks via `}[\n\t\r ]+(protected|private|public)`.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32656
git-svn-id: http://core.svn.wordpress.org/trunk@32626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 21:32:24 +00:00
Scott Taylor
c6a4512b1b
Add missing doc blocks to wp-admin/includes/*
.
...
Fix some egregious uses of tabbing.
Some functions can simply return `apply_filters(...)` instead of setting a variable that is immediately returned.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32654
git-svn-id: http://core.svn.wordpress.org/trunk@32624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 20:17:26 +00:00
Helen Hou-Sandí
f5646cd9e5
Define a primary column for WP_Post_Comments_List_Table
.
...
props boonebgorges.
see #25408 .
Built from https://develop.svn.wordpress.org/trunk@32651
git-svn-id: http://core.svn.wordpress.org/trunk@32621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:52:25 +00:00
Helen Hou-Sandí
4c0c7fd7ba
List tables: introduce the concept of a "primary" column.
...
This becomes the column that contains the row actions, and allows for a more flexibility, particularly with custom post types and list tables. To (re)define the primary column, use the `list_table_primary_column` filter, which receives the column name and the screen ID as arguments.
props stephdau, DaveAl, jesin.
see #25408 .
Built from https://develop.svn.wordpress.org/trunk@32644
git-svn-id: http://core.svn.wordpress.org/trunk@32614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 02:41:25 +00:00
Scott Taylor
b56b9b3e5c
Add @global
annotations for wp-admin/*
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32642
git-svn-id: http://core.svn.wordpress.org/trunk@32612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 21:41:30 +00:00
Scott Taylor
19b8ef0c92
get_comments()
can return int
, so a few places need to check if the return value is traversable before passing what is assumed to be an array
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32600
git-svn-id: http://core.svn.wordpress.org/trunk@32570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-25 17:59:25 +00:00
Scott Taylor
5a3dc2a371
In WP_Comments_List_Table::column_comment()
, all of the nonced URLs can be defined in the same conditional block in which they are used. Not doing this causes ambiguity, and local vars are set that are not available to all execution paths.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32516
git-svn-id: http://core.svn.wordpress.org/trunk@32486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-19 20:46:25 +00:00
Gary Pendergast
e3f1f8fed1
Ensure post titles are correctly escaped on the Dashboard.
...
Props helen, ocean90, dd32, pento.
Built from https://develop.svn.wordpress.org/trunk@32175
git-svn-id: http://core.svn.wordpress.org/trunk@32150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 07:39:25 +00:00
Dominik Schilling
5ef13b688e
Comments List: Don't let "Quick Edit" break on smaller screens.
...
Other class-wp-*-list-table.php files already contain a non-breaking space for the Quick Edit row action.
props kraftbj.
fixes #31482 .
Built from https://develop.svn.wordpress.org/trunk@31889
git-svn-id: http://core.svn.wordpress.org/trunk@31868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 22:15:27 +00:00
Dion Hulse
cc903c3422
Remove ambiguity in the time display format in core, switches to using 24hr notation where am/pm isn't specified.
...
* `H:i - 09:54`
* `g:i a - 9:54 am`
* `F j, Y - January 3, 2015`
These shouldn't be used without a/A (am/AM)
* `h:i - 01:23`
* `G:i - 1:23`
Props iseulde. Fixes #31121
Built from https://develop.svn.wordpress.org/trunk@31862
git-svn-id: http://core.svn.wordpress.org/trunk@31841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-23 02:14:27 +00:00
Scott Taylor
0ec87e4584
There are a few functions that have the ability to return false
instead of a string, so the return value should be checked before being passed to functions that expect string.
...
These are trivial, but they clear out some Scrutinizer issues.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31681
git-svn-id: http://core.svn.wordpress.org/trunk@31662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 02:11:28 +00:00
Andrew Ozz
19dbf7b998
Improve table footer tab sequence by moving <tfoot>
after <tbody>
. Props afercia, rianrietveld, DrewAPicture. Fixes #30914 .
...
Built from https://develop.svn.wordpress.org/trunk@31513
git-svn-id: http://core.svn.wordpress.org/trunk@31494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-22 21:48:26 +00:00
Scott Taylor
df09597a65
After [31146], properly declare $user_can
as a private
field in WP_Comments_List_Table
.
...
See #30891 .
Built from https://develop.svn.wordpress.org/trunk@31161
git-svn-id: http://core.svn.wordpress.org/trunk@31142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:02: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