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
Scott Taylor
bc1341628f
Comment List Tables:
...
* Declare `$extra_items` property
* Since `->get_column_info()` overrides its parent's method, it doesn't need to set `_column_headers`, which is an undeclared property that is only used for caching the lookup after the first run in the parent class, which isn't called in the child class.
* `$_args` in `WP_List_Table` has to be `protected` for `WP_Post_Comments_List_Table` to legally access it. `$_args` is awkward as is and should probably be only available via a getter.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@30984
git-svn-id: http://core.svn.wordpress.org/trunk@30970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 23:27:25 +00:00
Sergey Biryukov
471dc2022f
Add missing label to comment type filter dropdown.
...
props afercia.
fixes #29922 .
Built from https://develop.svn.wordpress.org/trunk@29872
git-svn-id: http://core.svn.wordpress.org/trunk@29631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 02:26:18 +00:00
Sergey Biryukov
ebdfe06843
Don't display an empty comment author IP link on Comments screen.
...
props afercia.
fixes #29766 .
Built from https://develop.svn.wordpress.org/trunk@29774
git-svn-id: http://core.svn.wordpress.org/trunk@29546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-28 06:38:18 +00:00
Andrew Nacin
f7392ef917
Pinking shears.
...
Built from https://develop.svn.wordpress.org/trunk@29707
git-svn-id: http://core.svn.wordpress.org/trunk@29481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-04 15:23:16 +00:00
Helen Hou-Sandí
b80c5d3e51
Comments: Simplify JS for inline edit and reply.
...
fixes #27533 .
Built from https://develop.svn.wordpress.org/trunk@29662
git-svn-id: http://core.svn.wordpress.org/trunk@29436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-02 03:57:18 +00:00
Drew Jaynes
d60a081137
Add @access
tags to constructor docblocks in list table classes.
...
See #28679 . See [29459].
Built from https://develop.svn.wordpress.org/trunk@29460
git-svn-id: http://core.svn.wordpress.org/trunk@29238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-10 02:22:16 +00:00
Drew Jaynes
8e86454467
Document default arguments for the WP_List_Table
class. Also add referenced docblocks to extending class constructors.
...
Props mikejolley for the initial patch.
Fixes #28679 . See #28298 .
Built from https://develop.svn.wordpress.org/trunk@29459
git-svn-id: http://core.svn.wordpress.org/trunk@29237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-10 02:18:17 +00:00
Drew Jaynes
097dc8ee15
Fix syntax for single- and multi-line comments in wp-admin-directory files.
...
See #28931 .
Built from https://develop.svn.wordpress.org/trunk@29206
git-svn-id: http://core.svn.wordpress.org/trunk@28990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 09:14:16 +00:00
Scott Taylor
176b9b2301
Fix mismatches in access modifiers for WP_List_Table
+ subclasses.
...
Fixes #28843 , #28879 .
Built from https://develop.svn.wordpress.org/trunk@29137
git-svn-id: http://core.svn.wordpress.org/trunk@28921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-13 22:09:16 +00:00
Sergey Biryukov
5f0b156155
Prevent bulk actions from being performed when Filter button is clicked.
...
props jesin.
fixes #28555 .
Built from https://develop.svn.wordpress.org/trunk@28916
git-svn-id: http://core.svn.wordpress.org/trunk@28715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 01:10:15 +00:00
Scott Taylor
c8936195f6
Allow comments in the trash to marked as spam.
...
Props mordauk.
Fixes #19256 .
Built from https://develop.svn.wordpress.org/trunk@28913
git-svn-id: http://core.svn.wordpress.org/trunk@28712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-29 23:19:16 +00:00
Scott Taylor
396e77b643
Use unobtrusive JS for Comment list table row actions.
...
Props aubreypwd.
Fixes #27533 .
Built from https://develop.svn.wordpress.org/trunk@28810
git-svn-id: http://core.svn.wordpress.org/trunk@28618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-23 23:55:16 +00:00
Scott Taylor
c403768fa2
Remove some dead variable assignments.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28629
git-svn-id: http://core.svn.wordpress.org/trunk@28449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 16:59:14 +00:00
Scott Taylor
2f513d3320
Fix some hackificator
odds and ends in wp-admin
:
...
* `wp-activate.php` and `wp-admin/themes.php` don't need the closing PHP tag
* Switch single quotes for HTML attribute values to double in a few places
* Convert `include_once file.php` syntax to `include_once( 'file.php' )`
* Add access modifiers to methods/members in: `_WP_List_Table_Compat`, `Walker_Nav_Menu_Edit`, `Walker_Nav_Menu_Checklist`, `WP_Screen`, `Walker_Category_Checklist`
* `edit_user()` doesn't need to import the `$wpdb` global
* `wp_list_widgets()` doesn't need to import the `$sidebars_widgets` global
* switch/endswitch syntax is not supported in Hack
* A `<ul>` in `wp-admin/users.php` is unclosed
See #27881 .
Built from https://develop.svn.wordpress.org/trunk@28500
git-svn-id: http://core.svn.wordpress.org/trunk@28326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:04:16 +00:00
Scott Taylor
e43e775c45
Add access modifier (public
) to members and methods in WP_Comments_List_Table
and WP_Post_Comments_List_Table
.
...
See #27881 , #22234 .
Built from https://develop.svn.wordpress.org/trunk@28486
git-svn-id: http://core.svn.wordpress.org/trunk@28312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-18 23:59:15 +00:00
Scott Taylor
f617b8669a
Eliminate use of extract()
in WP_Post_Comments_List_Table::display()
. The method only needs to read singular
from $this->_args
. Extraction is unnecessary.
...
Eliminate use of `extract()` in `WP_Comments_List_Table::display()`. The method uses no variables. Extraction can be completely removed.
See #22400 .
Built from https://develop.svn.wordpress.org/trunk@28385
git-svn-id: http://core.svn.wordpress.org/trunk@28213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-13 05:04:14 +00:00
Andrew Nacin
2fd8b60c22
Avoid JS errors before the commentReply script loads. Let's make this unobtrusive soon.
...
props aubreypwd.
fixes #24741 .
Built from https://develop.svn.wordpress.org/trunk@27747
git-svn-id: http://core.svn.wordpress.org/trunk@27584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 18:53:15 +00:00
Dominik Schilling
d1f3abe55c
Remove "Show" prefix from filter dropdowns, see #26743 .
...
Built from https://develop.svn.wordpress.org/trunk@27626
git-svn-id: http://core.svn.wordpress.org/trunk@27469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 22:13:14 +00:00
Andrew Ozz
87589dd445
Remove table cellspacing attribute from the admin, part-props MattyRob, fixes #22086 .
...
Built from https://develop.svn.wordpress.org/trunk@27036
git-svn-id: http://core.svn.wordpress.org/trunk@26912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-26 20:28:12 +00:00
Matt Thomas
5b327853e4
The comment screen hides the author column at narrow screen sizes; this adds back the author info above the comment content. Fixes #26618 , props SergeyBiryukov, nacin.
...
Built from https://develop.svn.wordpress.org/trunk@26961
git-svn-id: http://core.svn.wordpress.org/trunk@26840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-16 20:34:10 +00:00
Andrew Nacin
ad52b4ddd4
Remove whitespace from the inside of a <textarea> element, added in [26138] with inline documentation.
...
see #25662 .
Built from https://develop.svn.wordpress.org/trunk@26273
git-svn-id: http://core.svn.wordpress.org/trunk@26178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-19 19:35:10 +00:00
Sergey Biryukov
9119d189dd
Inline documentation for hooks in wp-admin/includes/class-wp-comments-list-table.php.
...
props siobhyb, kpdesign.
fixes #25662 .
Built from https://develop.svn.wordpress.org/trunk@26138
git-svn-id: http://core.svn.wordpress.org/trunk@26049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 19:47:10 +00:00
Sergey Biryukov
cd45adaa0b
Pass comment ID and comment post ID to get_comment_class() in WP_Comments_List_Table::single_row().
...
props drozdz.
fixes #25814 .
Built from https://develop.svn.wordpress.org/trunk@26001
git-svn-id: http://core.svn.wordpress.org/trunk@25934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-04 11:00:11 +00:00
Helen Hou-Sandí
c7e2071893
Make it possible to filter comment screen by post type; no UI. props johnbillion, c3mdigital. fixes #18596 .
...
Built from https://develop.svn.wordpress.org/trunk@25526
git-svn-id: http://core.svn.wordpress.org/trunk@25446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-20 20:16:11 +00:00
Sergey Biryukov
2ebbe00b55
Remove obsolete translator comment. props zeo. fixes #24464 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-23 08:30:30 +00:00
Sergey Biryukov
ed8fc60775
Remove unused variable. props zeo. fixes #24412 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-24 16:50:50 +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
Sergey Biryukov
dace3f0b6d
Remove redundant echo calls from list tables. Don't mix string concatenation with direct output. see #24210 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 01:10:50 +00:00
Ryan Boren
5f809d1d22
Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
...
see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:00:25 +00:00
Ryan Boren
43a7e695e9
Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
...
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Ryan Boren
cc5ed3a485
Change all core API to expect unslashed rather than slashed arguments.
...
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.
Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.
Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.
Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.
Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.
Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.
Plugins should use wp_unslash() on data being passed to core API.
Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.
Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.
Remove many no longer necessary calls to $wpdb->escape() and esc_sql().
In wp_get_referer() and wp_get_original_referer(), return unslashed data.
Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.
Switch several queries over to prepare().
Expect something to break.
Props alexkingorg
see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Andrew Ozz
cbd737470c
Kill use of colons in class names, props SergeyBiryukov, fixes #21152
...
git-svn-id: http://core.svn.wordpress.org/trunk@22396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 01:01:52 +00:00
Ryan Boren
a820d7481b
Handle screen arg in WP_Comments_List_Table constructor. Avoids warning when calling WP_Screen::get() later. fixes #22039
...
git-svn-id: http://core.svn.wordpress.org/trunk@22085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-29 10:05:15 +00:00