Last active
January 3, 2021 10:05
-
-
Save gvgvgvijayan/435293b5b71bd2d2e91dbfbedfbd501a 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 | |
... | |
/** | |
* Retrieve post types to be shown in the table. | |
* | |
* @return array Allowed post types in an array. | |
*/ | |
private function allowed_post_types() { | |
$post_types = get_post_types( array( 'public' => true ) ); | |
unset( $post_types['attachment'] ); | |
return $post_types; | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment