Commit Graph

33 Commits

Author SHA1 Message Date
Gary Pendergast 8f95800d52 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Drew Jaynes 829139ba1a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41161 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 00:39:34 +00:00
Sergey Biryukov 5508cdedba Docs: Correct `@global` entry for `$cat_id` in `WP_Links_List_Table::column_categories()`.
Props tejas5989.
Fixes #41436.

git-svn-id: https://develop.svn.wordpress.org/trunk@41147 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 13:18:20 +00:00
Andrea Fercia ee7f970ffa 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38672 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-28 19:53:07 +00:00
Sergey Biryukov 1b91fc660f Taxonomy: Remove unnecessary 'All categories' string on Edit Posts and Edit Links screens and use taxonomy's `all_items` label instead.
Props johnbillion.
Fixes #36049.

git-svn-id: https://develop.svn.wordpress.org/trunk@36808 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-02 22:13:14 +00:00
Andrea Fercia c6c9dcb8c6 Link Manager: Fix usage of translation functions after [35998].
Uses `printf()` instead, adds translator comment.

Fixes #35135.

git-svn-id: https://develop.svn.wordpress.org/trunk@36792 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-29 23:25:38 +00:00
Andrea Fercia 7998e04c48 Accessibility: Remove title attributes from the Link Manager screen.
Title attributes are now replaced with `aria-label` where appropriate.
Also fixes some typos in the DocBlocks.

Fixes #35135.

git-svn-id: https://develop.svn.wordpress.org/trunk@35998 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-17 22:52:27 +00:00
Drew Jaynes 5a0fd03f95 Docs: Add missing file headers to the list table classes and adjust class DocBlocks accordingly.
See #33701.


git-svn-id: https://develop.svn.wordpress.org/trunk@35241 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 15:12:48 +00:00
Scott Taylor aee18d2d38 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@33270 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-14 17:46:13 +00:00
Drew Jaynes c68c1ade16 Add missing summaries, `@access` tags, and some parameter descriptions for methods added to `WP_Links_List_Table` in 4.3.
See [32753]. See #32891.


git-svn-id: https://develop.svn.wordpress.org/trunk@33204 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-13 18:02:38 +00:00
Scott Taylor 296c559baf `if` is a statment, not a function.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32800 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:00:15 +00:00
Scott Taylor c32f856cf3 In `WP_Links_List_Table::display_rows()`:
* Move the giant `switch` statement into methods
* Call `-single_row_columns()`, which it inherits from `WP_List_Table`

See #29881.


git-svn-id: https://develop.svn.wordpress.org/trunk@32753 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-13 15:32:57 +00:00
Helen Hou-Sandi c2ed5b170d List tables: Use a class instead of inline styles for hidden columns.
fixes #32608.


git-svn-id: https://develop.svn.wordpress.org/trunk@32724 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-10 19:46:39 +00:00
Drew Jaynes e3077edcad Fix formatting and add missing return descriptions for inline documenation introduced in [32644] for `WP_List_Table`.
Also fixes an error introduced in [32661] for `WP_Links_List_Table`.

See #25408. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32662 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-31 01:28:28 +00:00
Drew Jaynes 3725befcd8 Fix formatting and add a missing return description for inline documentation introduced in [32644] for `WP_Links_List_Table`.
See #25408. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32661 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-31 01:22:28 +00:00
Scott Taylor c49c139a22 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32656 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 21:31:56 +00:00
Scott Taylor ec5758225c 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32654 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 20:16:22 +00:00
Helen Hou-Sandi 86c907d2a5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@32644 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 02:40:52 +00:00
Scott Taylor 23ce2efd12 Add `@global` annotations for `wp-admin/*`.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32642 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 21:40:27 +00:00
Helen Hou-Sandi 8ab449ae35 List tables: Use CSS :nth-child() selectors for zebra striping.
Note that this does not fix issues related to comment quick edit. Internal linking also continues to use the `.alternate` class for now. IE8 and below gracefully degrade by not having zebra striping.

There is some hoop jumping with adding an extra table row to maintain zebra striping during quick edit. Documenting that here for future reference; it is also in the inline documentation.

fixes #30981 and #26060. see #25060.


git-svn-id: https://develop.svn.wordpress.org/trunk@31181 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-14 22:13:03 +00:00
John Blackbourn 7082b703b2 Improve various hook and filter docs so they are correctly parsed for the code reference.
Fixes #30558
Props DrewAPicture


git-svn-id: https://develop.svn.wordpress.org/trunk@30754 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-06 21:31:41 +00:00
Sergey Biryukov c50be6a735 Remove "View" prefix from category filter dropdowns, for consistency with [27626].
props afercia.
see #29921.

git-svn-id: https://develop.svn.wordpress.org/trunk@29871 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 02:22:08 +00:00
Sergey Biryukov 8d2f5d0cc5 Add missing labels to category filter dropdowns.
props afercia.
fixes #29921.

git-svn-id: https://develop.svn.wordpress.org/trunk@29870 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-11 02:20:05 +00:00
Andrew Nacin ca32a2d410 Pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@29707 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-04 15:22:58 +00:00
Drew Jaynes (DrewAPicture) 39ba840e04 Add `@access` tags to constructor docblocks in list table classes.
See #28679. See [29459].


git-svn-id: https://develop.svn.wordpress.org/trunk@29460 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-10 02:21:56 +00:00
Drew Jaynes (DrewAPicture) 126147a877 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@29459 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-10 02:17:14 +00:00
Scott Taylor 510ad2e1e9 Fix mismatches in access modifiers for `WP_List_Table` + subclasses.
Fixes #28843, #28879.


git-svn-id: https://develop.svn.wordpress.org/trunk@29137 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-13 22:08:22 +00:00
Scott Taylor 63cb20cc5a Repent for our original OOP sins and doc blocks as pertains to access modifiers in List Table + subclasses.
Props SergeyBiryukov.
See #28843 and [28583].


git-svn-id: https://develop.svn.wordpress.org/trunk@29118 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-12 03:26:40 +00:00
Sergey Biryukov 29aabd08a9 Prevent bulk actions from being performed when Filter button is clicked.
props jesin.
fixes #28555.

git-svn-id: https://develop.svn.wordpress.org/trunk@28916 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-30 01:09:25 +00:00
Scott Taylor d6a3c2a0de Add access modifiers to methods and members of list table classes:
* `WP_List_Table` is the base class that implements `__get()` and `__call()` for BC
* Adds unit tests to confirm that subclasses properly inherit magic methods
* Add modifiers to subclasses: `WP_Links_List_Table`, `WP_Media_List_Table`, `WP_MS_Sites_List_Table`, `WP_MS_Themes_List_Table`, `WP_MS_Users_List_Table`, `WP_Plugin_Install_List_Table`, `WP_Plugins_List_Table`, `WP_Posts_List_Table`, `WP_Terms_List_Table`, `WP_Theme_Install_List_Table`, `WP_Themes_List_Table`

See #27881, #22234.


git-svn-id: https://develop.svn.wordpress.org/trunk@28493 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 01:16:16 +00:00
Andrew Ozz 48d24f6bf5 Remove all "valign" attributes from tables in wp-admin, props MikeHansenMe, Marventus. Fixes #22712.
git-svn-id: https://develop.svn.wordpress.org/trunk@27029 602fd350-edb4-49c9-b593-d223f7449a82
2014-01-24 19:05:15 +00:00
Drew Jaynes 30600cefa0 Inline documentation for hooks in wp-admin/includes/class-wp-links-list-table.php.
Props JoshuaAbenazer, kpdesign.
Fixes #26052.


git-svn-id: https://develop.svn.wordpress.org/trunk@26340 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-23 21:27:05 +00:00
Andrew Nacin b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00