Created
January 23, 2021 10:36
-
-
Save gvgvgvijayan/dc8556bb8dca14a85a3cf17f91c8c98a to your computer and use it in GitHub Desktop.
This gist is used in the tutorial https://www.vijayan.in/how-to-create-custom-table-list-in-wordpress-admin-page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
/** | |
* Fires in head section of admin page | |
*/ | |
add_action( | |
'admin_head', | |
function() : void { | |
$page = esc_attr( filter_input( INPUT_GET, 'page' ) ); | |
if ( 'all-drafts' !== $page ) { | |
return; | |
} | |
echo '<style type="text/css">'; | |
echo '.wp-list-table .column-type { width: 10%; }'; | |
echo '</style>'; | |
} | |
); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment