lib/Post.php
protected function check_post_id( $pid ) {
		if ( is_numeric($pid) && $pid === 0 ) {
			$pid = get_the_ID();
			return $pid;
		}
		if ( !is_numeric($pid) && is_string($pid) ) {
			$pid = PostGetter::get_post_id_by_name($pid);
			return $pid;
		}
		if ( !$pid ) {
			return null;
		}
		return $pid;
	}
protected function check_post_id( $pid ) {
		if ( is_numeric($pid) && $pid === 0 ) {
			$pid = get_the_ID();
			return $pid;
		}
		if ( !is_numeric($pid) && is_string($pid) ) {
			$pid = PostGetter::get_post_id_by_name($pid);
			return $pid;
		}
		if ( !$pid ) {
			return null;
		}
		return $pid;
	}
protected function check_post_id ( $ pid ) { if ( is_numeric ( $ pid ) && $ pid === 0 ) { $ pid = get_the_ID ( ) ; return $ pid ; } if ( ! is_numeric ( $ pid ) && is_string ( $ pid ) ) { $ pid = PostGetter :: get_post_id_by_name ( $ pid ) ; return $ pid ; } if ( ! $ pid ) { return null ; } return $ pid ; }
helps you find the post id regardless of whether you send a string or whatever
@param integer $pid ;
@internal
@return integer ID number of a post
helps you find the post id regardless of whether you send a string or whatever