Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #49715, comment 30


Ignore:
Timestamp:
07/07/2020 09:16:34 PM (4 years ago)
Author:
Offereins
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49715, comment 30

    initial v1  
    11Reading the recent changeset I'd like to ask the following:
    22* Couldn't `$mode_class = 'extended' === $mode ? 'table-view-extended' : 'table-view-' . $mode;` be more like `$mode_class = 'table-view-' . $mode;` or interpolated as `$mode_class = "table-view-{$mode}";`?
    3 * For the sake of (future) consistency, should a registration pattern for modes (eg `array( key => label )`) not be better suited? The new hooks (looking at `wp_table_view_modes`) provide a lot of room for deviations in HTML markup. Might I suggest to use a filterable list of modes, which would allow for removing modes and reordering modes, as well as a consistent output of HTML markup handled by core.
     3* For the sake of (future) consistency, should a registration pattern for modes (eg `array( key => label )`) not be better suited? The new hooks (looking at `wp_table_view_modes`) provide a lot of room for deviations in HTML markup. Might I suggest to use a filterable list of modes, which would allow for removing and reordering modes, as well as a consistent output of HTML markup handled by core.
     4* Also, why is renaming the `excerpt` mode key not expected to affect backwards compatibility?