public static function remove_trailing_slash($link) { if ($link != "/") { $link = untrailingslashit($link); } return $link; }