You want to replace a string within the result, you’ve got it in the function’s arguments. Nothing WordPress-specific here.
$post_url = str_replace( 'http://', '', wp_get_shortlink() );
You want to replace a string within the result, you’ve got it in the function’s arguments. Nothing WordPress-specific here.
$post_url = str_replace( 'http://', '', wp_get_shortlink() );