This is a really lame way to get the WordPress Post ID when on the administration screen.
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 | |
// ... | |
// This should NOT be this difficult ... but at the moment it's what we have. | |
private function _get_admin_post_id() | |
{ | |
return absint(isset($_GET['post']) ? $_GET['post'] : (isset($_POST['post_ID']) ? $_POST['post_ID'] : 0)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment