Skip to content

Add a filter to change the classes in posts list table in admin#4885

Open
pamprn09 wants to merge 2 commits intoWordPress:trunkfrom
pamprn09:58824/post-list
Open

Add a filter to change the classes in posts list table in admin#4885
pamprn09 wants to merge 2 commits intoWordPress:trunkfrom
pamprn09:58824/post-list

Conversation

@pamprn09
Copy link
Copy Markdown

@pamprn09 pamprn09 marked this pull request as draft July 21, 2023 18:04
@pamprn09 pamprn09 marked this pull request as ready for review July 24, 2023 13:54
@supardiii314-cmyk
Copy link
Copy Markdown

From 2b7c4a5 Mon Sep 17 00:00:00 2001
From: Pamela Ribeiro contato@pamelanascimento.com
Date: Fri, 21 Jul 2023 15:01:42 -0300
Subject: [PATCH 1/2] Initial commit

From a9eb017 Mon Sep 17 00:00:00 2001
From: Pamela Ribeiro contato@pamelanascimento.com
Date: Fri, 21 Jul 2023 15:16:48 -0300
Subject: [PATCH 2/2] I've added a filter to the classes


src/wp-admin/includes/class-wp-list-table.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 8fe580bdc7e03..4f4a33876a80d 100644
--- a/src/wp-admin/includes/class-wp-list-table.php
+++ b/src/wp-admin/includes/class-wp-list-table.php
@@ -1419,7 +1419,9 @@ protected function get_table_classes() {

	$mode_class = esc_attr( 'table-view-' . $mode );
  •   return array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] );
    
  •   $classes = array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] );
    
  •   return apply_filters( 'post_list_table_classes', $classes, $this );
    

    }

    /**

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 2, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @supardiii314-cmyk.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props pamprn.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@supardiii314-cmyk
Copy link
Copy Markdown

diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 8fe580bdc7e03..4f4a33876a80d 100644
--- a/src/wp-admin/includes/class-wp-list-table.php
+++ b/src/wp-admin/includes/class-wp-list-table.php
@@ -1419,7 +1419,9 @@ protected function get_table_classes() {

	$mode_class = esc_attr( 'table-view-' . $mode );
  •   return array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] );
    
  •   $classes = array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] );
    
  •   return apply_filters( 'post_list_table_classes', $classes, $this );
    

    }

    /**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants