Updated logic for $post_id parameter to handle a user, term or post object

Signed-off-by: Elliot Condon <e@elliotcondon.com>