Skip to content

Instantly share code, notes, and snippets.

@hasanTheBest
Created February 14, 2019 01:21
Show Gist options
  • Save hasanTheBest/78fe02a5c14b363335d52638890154c7 to your computer and use it in GitHub Desktop.
Save hasanTheBest/78fe02a5c14b363335d52638890154c7 to your computer and use it in GitHub Desktop.
$post_id = 0;
if ( isset( $_REQUEST['post'] ) || isset( $_REQUEST['post_ID'] ) ) {
$post_id = empty( $_REQUEST['post_ID'] ) ? $_REQUEST['post'] : $_REQUEST['post_ID'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment