Created
January 3, 2021 10:58
-
-
Save gvgvgvijayan/a5a4ac1ee19a2f64f1d96785133b272d 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 | |
... | |
/** | |
* A map method return all allowed post types to human readable format. | |
* | |
* @return array Array of allowed post types in human readable format. | |
*/ | |
private function allowed_post_types_readable() { | |
$formatted = array_map( | |
array( $this, 'human_readable' ), | |
$this->allowed_post_types | |
); | |
return $formatted; | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment